]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_client.qc
Set the proper voice types in code
[voretournament/voretournament.git] / data / qcsrc / server / cl_client.qc
index 47f27497ea643705c706b4527f01f4027fb0df4d..448fb8d33c525e38fecdeacf8a669eb280daa03d 100644 (file)
@@ -516,7 +516,7 @@ float Client_customizeentityforclient()
        if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
        {\r
                Client_setmodel(setmodel_state());\r
-               if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+               if not(self.predator.classname == "player" || self.fakeprey)\r
                        self.alpha = default_player_alpha;\r
                return TRUE;\r
        }\r
@@ -530,7 +530,7 @@ float Client_customizeentityforclient()
                return TRUE;\r
        }\r
        Client_setmodel(setmodel_state());\r
-       if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+       if not(self.predator.classname == "player" || self.fakeprey)\r
                self.alpha = default_player_alpha;\r
        return TRUE;\r
 }\r
@@ -828,8 +828,6 @@ void PutClientInServer (void)
 \r
                RemoveGrabber(self); // Wazat's Grabber\r
 \r
-               Vore_DeadPrey_Detach(self);\r
-\r
                self.classname = "player";\r
                self.wasplayer = TRUE;\r
                self.iscreature = TRUE;\r
@@ -924,6 +922,8 @@ void PutClientInServer (void)
 \r
                SetCustomizer(self, Client_customizeentityforclient, Client_uncustomizeentityforclient);\r
 \r
+               Vore_DeadPrey_Detach(self);\r
+\r
                self.model = "";\r
                FixPlayermodel();\r
 \r
@@ -2634,8 +2634,24 @@ void PlayerPreThink (void)
        if(self.taunt_soundtime)\r
        if(time > self.taunt_soundtime)\r
        {\r
+               switch(self.taunt_soundtype)\r
+               {\r
+                       case TAUNTTYPE_DEATH:\r
+                               PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
+                               break;\r
+                       case TAUNTTYPE_VOREPRED:\r
+                               PlayerSound(self, playersound_pred, CHAN_VOICE, VOICETYPE_AUTOTAUNT); // change this properly\r
+                               break;\r
+                       case TAUNTTYPE_VOREPREY:\r
+                               PlayerSound(self, playersound_prey, CHAN_VOICE, VOICETYPE_AUTOTAUNT); // change this properly\r
+                               break;\r
+                       default:\r
+                               dprint("Incorrect autotaunt type\n");\r
+                               break;\r
+               }\r
+\r
                self.taunt_soundtime = 0;\r
-               PlayerSound(self, playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);\r
+               self.taunt_soundtype = 0;\r
        }\r
 \r
        target_voicescript_next(self);\r