]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_client.qc
Fix my last fix
[voretournament/voretournament.git] / data / qcsrc / server / cl_client.qc
index ec685f36ecdebff6b1b45794e283b04cf50fc88f..0c5083a1be47e838f3857c20d16493d8f42ad358 100644 (file)
@@ -435,8 +435,16 @@ string setmodel_state()
        newmodel_name = substring(self.playermodel, 0, strlen(self.playermodel) - 4);\r
        newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
 \r
-       if(self.stomach_load)\r
-               applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), newmodel_extension);\r
+       float vore_state;\r
+       if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.666666666666))\r
+               vore_state = 3;\r
+       else if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.333333333333))\r
+               vore_state = 2;\r
+       else if(self.stomach_load)\r
+               vore_state = 1;\r
+\r
+       if(vore_state)\r
+               applymodel = strcat(newmodel_name, "_state", ftos(vore_state), newmodel_extension);\r
        else\r
                applymodel = self.playermodel;\r
 \r
@@ -515,7 +523,7 @@ float Client_customizeentityforclient()
        // this is only visible to the prey however, otherwise players would appear as a floating stomach to everyone (ewww)\r
        stomachmodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_stomach.md3"); // 4 is the extension length\r
 \r
-       if(other.spectatee_status)\r
+       if(other.spectatee_status && other.spectatee_status == num_for_edict(other.enemy))\r
                other = other.enemy; // also do this for the player we are spectating\r
 \r
        // don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view\r
@@ -1035,7 +1043,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
 \r
        WriteCoord(MSG_ENTITY, cvar("g_vore"));\r
-       WriteCoord(MSG_ENTITY, cvar("g_balance_vore_swallow_limit"));\r
+       WriteCoord(MSG_ENTITY, g_balance_vore_swallow_limit);\r
        return TRUE;\r
 }\r
 \r