]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move that shizniz to the .qh file
authorSamual Lenks <samual@xonotic.org>
Sun, 21 Apr 2013 15:18:42 +0000 (11:18 -0400)
committerSamual Lenks <samual@xonotic.org>
Sun, 21 Apr 2013 15:18:42 +0000 (11:18 -0400)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh

index 5c7da3a0adb7a29adf1947c302dfc82e3386423f..45587607e6d911938817c8f1305b232b7dcdd5a5 100644 (file)
@@ -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
index c21488d3664d52dd8e427a418f5bf14a60a84ec0..bc87ef3109072f1b330fc5313e67e3e431ff9022 100644 (file)
@@ -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