From aace922fc846ab6e9ace9595e9b666e8190f0fd9 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 21 Apr 2013 11:18:42 -0400 Subject: [PATCH] Move that shizniz to the .qh file --- qcsrc/common/notifications.qc | 13 ++++++------- qcsrc/common/notifications.qh | 2 ++ 2 files changed, 8 insertions(+), 7 deletions(-) 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 -- 2.39.2