]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
Limit g_balance_vore_swallow_limit between 1 and 9. This fixes some small bugs, such...
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index c3bde6ce9c7357358bad2f0a4690c97c56a6ec43..430d6655b9c7f692343153dfcae2031ea690c0a2 100644 (file)
@@ -114,6 +114,7 @@ void CopyBody(float keepvelocity)
        self.lip = oldself.lip;\r
        self.colormap = oldself.colormap;\r
        self.colormod = oldself.colormod;\r
+       self.glowmod = oldself.glowmod;\r
        self.iscreature = oldself.iscreature;\r
        self.angles = oldself.angles;\r
        self.avelocity = oldself.avelocity;\r
@@ -309,7 +310,14 @@ void player_anim (void)
 \r
        if (!self.animstate_override)\r
        {\r
-               if (!(self.flags & FL_ONGROUND))\r
+               if(self.stat_eaten)\r
+               {\r
+                       if(self.BUTTON_ATCK || self.predator.digesting)\r
+                               setanim(self, self.anim_pain2, FALSE, TRUE, FALSE); // looks good for prey attacking the stomach or being digested\r
+                       else\r
+                               setanim(self, self.anim_jump, FALSE, TRUE, FALSE); // looks good for prey idling inside the stomach\r
+               }\r
+               else if (!(self.flags & FL_ONGROUND))\r
                {\r
                        if (self.crouch)\r
                                setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump);\r
@@ -749,7 +757,7 @@ void UpdateSelectedPlayer()
        selected = world;\r
        selected_score = 0.95; // 18 degrees\r
 \r
-       if(self.predator.classname == "player")\r
+       if(self.stat_eaten)\r
        {\r
                if(!self.dropweapon_check)\r
                if(self.predator.team != self.team) // don't disarm team mates when swallowing them\r
@@ -1233,7 +1241,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
                                                {\r
-                                                       if(self.predator.classname == "player")\r
+                                                       if(self.stat_eaten)\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
@@ -1252,7 +1260,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
                                                {\r
-                                                       if(self.predator.classname == "player")\r
+                                                       if(self.stat_eaten)\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
@@ -1271,7 +1279,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                {\r
                                        if(msg_entity.cvar_cl_voice_directional == 1)\r
                                        {\r
-                                               if(self.predator.classname == "player")\r
+                                               if(self.stat_eaten)\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
@@ -1292,7 +1300,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
                                if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                {\r
-                                       if(self.predator.classname == "player")\r
+                                       if(self.stat_eaten)\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
@@ -1312,7 +1320,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                        {\r
                                if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                {\r
-                                       if(self.predator.classname == "player")\r
+                                       if(self.stat_eaten)\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
@@ -1321,14 +1329,14 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                        }\r
                case VOICETYPE_PLAYERSOUND:\r
-                       if(self.predator.classname == "player")\r
+                       if(self.stat_eaten)\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
-                               sound(self, chan, sample, VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit"), ATTN_NORM);\r
+                               sound(self, chan, sample, VOL_BASE * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM);\r
                        else\r
                                stopsound(self, chan);\r
                        break;\r