]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Use a (likely bad) way of making each player's taunt not limit another player's taunt...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 01:12:54 +0000 (03:12 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 01:12:54 +0000 (03:12 +0200)
data/qcsrc/server/cl_player.qc

index 14d44a236eeee3c4b0b265891a38deab044eba2b..ea3a9797194c58fe35f0bb1f2ac7d886176a6631 100644 (file)
@@ -1212,6 +1212,7 @@ void UpdatePlayerSounds()
 }\r
 \r
 .float soundtimefilter;\r
+.entity soundownerfilter;\r
 void GlobalSound(string sample, float chan, float voicetype)\r
 {\r
        float n;\r
@@ -1294,8 +1295,10 @@ void GlobalSound(string sample, float chan, float voicetype)
                                break;\r
                        tauntrand = random();\r
                        FOR_EACH_REALCLIENT(msg_entity)\r
+                       {\r
+                               msg_entity.soundownerfilter = self;\r
                                if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
-                               if not (self.taunt_soundtimefiltered && msg_entity.soundtimefilter > time)\r
+                               if not (self.taunt_soundtimefiltered && msg_entity.soundownerfilter.soundtimefilter > time)\r
                                {\r
                                        if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                        {\r
@@ -1308,8 +1311,9 @@ void GlobalSound(string sample, float chan, float voicetype)
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
 \r
                                        if(self.taunt_soundtimefiltered)\r
-                                               msg_entity.soundtimefilter = time + msg_entity.cvar_cl_autotaunt_repeat;\r
+                                               msg_entity.soundownerfilter.soundtimefilter = time + msg_entity.cvar_cl_autotaunt_repeat;\r
                                }\r
+                       }\r
                        break;\r
                case VOICETYPE_TAUNT:\r
                        if(self.classname == "player")\r