From: Samual Lenks Date: Sun, 21 Apr 2013 15:18:42 +0000 (-0400) Subject: Move that shizniz to the .qh file X-Git-Tag: xonotic-v0.7.0~73^2~3^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aace922fc846ab6e9ace9595e9b666e8190f0fd9;p=xonotic%2Fxonotic-data.pk3dir.git Move that shizniz to the .qh file --- diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 5c7da3a0a..45587607e 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -836,12 +836,11 @@ string Local_Notification_sprintf( } #ifdef CSQC -string previous_announcement; void Local_Notification_sound( float soundchannel, string soundfile, float soundvolume, float soundposition) { - if((soundfile != previous_announcement) || (time >= (previous_announcement_time + autocvar_cl_announcer_antispam))) + if((soundfile != prev_soundfile) || (time >= (prev_soundtime + autocvar_cl_announcer_antispam))) { #ifdef NOTIFICATIONS_DEBUG dprint(sprintf( @@ -869,9 +868,9 @@ void Local_Notification_sound( soundposition ); - if(previous_announcement) { strunzone(previous_announcement); } - previous_announcement = strzone(soundfile); - previous_announcement_time = time; + if(prev_soundfile) { strunzone(prev_soundfile); } + prev_soundfile = strzone(soundfile); + prev_soundtime = time; } else { @@ -886,8 +885,8 @@ void Local_Notification_sound( ), soundvolume, soundposition, - previous_announcement, - (time - previous_announcement_time), + prev_soundfile, + (time - prev_soundtime), autocvar_cl_announcer_antispam )); #endif diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index c21488d36..bc87ef310 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -75,6 +75,8 @@ void Local_Notification_WOVA( #ifdef CSQC // CLIENT ONLY void Read_Notification(float is_new); +string prev_soundfile; +float prev_soundtime; #endif #ifdef SVQC // SERVER ONLY