]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
Make the vore taunt play-rate server side. There's simply no way to make it a client...
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index ea3a9797194c58fe35f0bb1f2ac7d886176a6631..bef0ec68355d2b26fd0af6c57ac306384673c69a 100644 (file)
@@ -1211,8 +1211,6 @@ void UpdatePlayerSounds()
        LoadPlayerSounds(strcat(self.model, ".sounds"), 0);\r
 }\r
 \r
-.float soundtimefilter;\r
-.entity soundownerfilter;\r
 void GlobalSound(string sample, float chan, float voicetype)\r
 {\r
        float n;\r
@@ -1296,23 +1294,16 @@ void GlobalSound(string sample, float chan, float voicetype)
                        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.soundownerfilter.soundtimefilter > time)\r
+                               if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                {\r
-                                       if (msg_entity.cvar_cl_voice_directional >= 1)\r
-                                       {\r
-                                               if(self.predator.classname == "player")\r
-                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
-                                               else\r
-                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
-                                       }\r
+                                       if(self.predator.classname == "player")\r
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
                                        else\r
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
-\r
-                                       if(self.taunt_soundtimefiltered)\r
-                                               msg_entity.soundownerfilter.soundtimefilter = time + msg_entity.cvar_cl_autotaunt_repeat;\r
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
                                }\r
+                               else\r
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                        }\r
                        break;\r
                case VOICETYPE_TAUNT:\r