Do the same for the stomach model
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 17:10:23 +0000 (20:10 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 17:10:23 +0000 (20:10 +0300)
data/qcsrc/server/cl_client.qc

index 1905968..74ab85b 100644 (file)
@@ -466,6 +466,7 @@ void Client_uncustomizeentityforclient()
 float Client_customizeentityforclient()\r
 {\r
        entity modelsource;\r
+       string applymodel;\r
 \r
        if(self.modelindex == 0)\r
                return TRUE;\r
@@ -520,8 +521,8 @@ float Client_customizeentityforclient()
                other = other.enemy; // also do this for the player we are spectating\r
        if(other.predator == self)\r
        {\r
-               tokenizebyseparator(self.playermodel, ".");\r
-               Client_setmodel(strcat(argv(0), "_stomach.md3"));\r
+               applymodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_stomach.md3"); // 4 is the extension length\r
+               Client_setmodel(applymodel);\r
                self.alpha = other.cvar_cl_vore_stomachmodel;\r
                return TRUE;\r
        }\r