]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
eater -> predator, because that's a more correct word
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index b12a10744861fcedceac01aee5a47beca471ea4d..26b50d44b85fc56797b51b60e97739df4e1fe990 100644 (file)
@@ -279,8 +279,13 @@ void player_setupanimsformodel()
        }\r
        else\r
                dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n");\r
+\r
+       // the line below is disabled due to issues with the stomach model, which cannot be animated.\r
+       // customizeentityforclient cannot let this part of the code know whether it's the stomach model or normal\r
+       // player model we're using. Attempting to animate the stomach model causes BIG issues, and must not be allowed.\r
+\r
        // reset animstate now\r
-       setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
+       //setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
 };\r
 \r
 void player_anim (void)\r
@@ -741,10 +746,10 @@ void UpdateSelectedPlayer()
        selected = world;\r
        selected_score = 0.95; // 18 degrees\r
 \r
-       if(self.eater.classname == "player")\r
+       if(self.predator.classname == "player")\r
        {\r
                if(!self.dropweapon_check)\r
-               if(self.eater.team != self.team) // don't disarm team mates when swallowing them\r
+               if(self.predator.team != self.team) // don't disarm team mates when swallowing them\r
                if(random() < cvar("g_vore_dropweapon"))\r
                        SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
                self.dropweapon_check = TRUE;\r
@@ -1224,7 +1229,12 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        if(clienttype(msg_entity) == CLIENTTYPE_REAL)\r
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                               {\r
+                                                       if(self.predator.classname == "player")\r
+                                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
+                                                       else\r
+                                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                               }\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                        }\r
@@ -1238,7 +1248,12 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        if(clienttype(msg_entity) == CLIENTTYPE_REAL)\r
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                               {\r
+                                                       if(self.predator.classname == "player")\r
+                                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
+                                                       else\r
+                                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                               }\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                        }\r
@@ -1252,7 +1267,12 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if(!teams_matter || msg_entity.team == self.team)\r
                                {\r
                                        if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                       {\r
+                                               if(self.predator.classname == "player")\r
+                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
+                                               else\r
+                                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
+                                       }\r
                                        else\r
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                }\r
@@ -1269,7 +1289,12 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
                                {\r
                                        if (msg_entity.cvar_cl_voice_directional >= 1)\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, 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
@@ -1285,12 +1310,20 @@ void GlobalSound(string sample, float chan, float voicetype)
                        FOR_EACH_REALCLIENT(msg_entity)\r
                        {\r
                                if (msg_entity.cvar_cl_voice_directional >= 1)\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, 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
                case VOICETYPE_PLAYERSOUND:\r
-                       sound(self, chan, sample, VOL_BASE, ATTN_NORM);\r
+                       if(self.predator.classname == "player")\r
+                               sound(self, chan, sample, VOL_BASE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_NORM);\r
+                       else\r
+                               sound(self, chan, sample, VOL_BASE, ATTN_NORM);\r
                        break;\r
                case VOICETYPE_GURGLE:\r
                        if(self.stomach_load)\r