X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fnotifications.qc;h=5a55c5552c156a3954b0598f66e296fe3427f122;hb=ffff2eb6787228f47eaaa40363a0f1263bd677e1;hp=b040a536894fd62eb4d147d6dedb6648e18826ca;hpb=ef74e1ba8e890befb4a4892a96d244a66c05fd48;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index b040a5368..5a55c5552 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -1,15 +1,14 @@ #if defined(CSQC) + #include "../client/announcer.qh" #elif defined(MENUQC) #elif defined(SVQC) - #include "../dpdefs/progsdefs.qh" - #include "../dpdefs/dpextensions.qh" #include "constants.qh" #include "teams.qh" #include "../server/autocvars.qh" #include "../server/constants.qh" #include "../server/defs.qh" #include "notifications.qh" - #include "../server/mutators/mutators_include.qh" + #include "../server/mutators/all.qh" #endif // ================================================ @@ -69,7 +68,7 @@ string Notification_CheckArgs_TypeName(float net_type, float net_name) { // check supplied type and name for errors string checkargs = ""; - #define CHECKARG_TYPENAME(type) case MSG_##type##: \ + #define CHECKARG_TYPENAME(type) case MSG_##type: \ { if(!net_name || (net_name > NOTIF_##type##_COUNT)) \ { checkargs = sprintf("Improper name: %d!", net_name); } break; } switch(net_type) @@ -597,7 +596,7 @@ void Create_Notification_Entity( { if(notif.nent_enabled) { - precache_sound(sprintf("announcer/%s/%s.wav", autocvar_cl_announcer, snd)); + precache_sound(sprintf("announcer/%s/%s.wav", AnnouncerOption(), snd)); notif.nent_channel = channel; notif.nent_snd = strzone(snd); notif.nent_vol = vol; @@ -1278,7 +1277,7 @@ void Local_Notification_sound( soundchannel, sprintf( "announcer/%s/%s.wav", - autocvar_cl_announcer, + AnnouncerOption(), soundfile ), soundvolume, @@ -1286,12 +1285,12 @@ void Local_Notification_sound( )); #endif - sound( + _sound( world, soundchannel, sprintf( "announcer/%s/%s.wav", - autocvar_cl_announcer, + AnnouncerOption(), soundfile ), soundvolume, @@ -1313,7 +1312,7 @@ void Local_Notification_sound( soundchannel, sprintf( "announcer/%s/%s.wav", - autocvar_cl_announcer, + AnnouncerOption(), soundfile ), soundvolume, @@ -1550,7 +1549,7 @@ void Local_Notification(int net_type, int net_name, ...count) case MSG_INFO: { - LOG_INFO( + print( Local_Notification_sprintf( notif.nent_string, notif.nent_args, @@ -1773,8 +1772,8 @@ void Net_Notification_Remove() remove(self); } -float Net_Write_Notification(entity client, int sf) -{SELFPARAM(); +bool Net_Write_Notification(entity this, entity client, int sf) +{ if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client)) { WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);