]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Finally fix the server code attempting to animate stomach models... an issue which...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 12:35:17 +0000 (15:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 12:35:17 +0000 (15:35 +0300)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_player.qc

index a946c85474a08987fa709bf143ea960b6bbfa0ed..b9f654aa5be4e8235322cd129bb3a57a6817ba08 100644 (file)
@@ -526,6 +526,7 @@ float Client_customizeentityforclient()
        {\r
                applymodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_stomach.md3"); // 4 is the extension length\r
                Client_setmodel(applymodel);\r
+               self.frame = 0; // don't use any animations as a stomach\r
                self.alpha = other.cvar_cl_vore_stomachmodel;\r
                return TRUE;\r
        }\r
index 36542cf7a760f29c6e0363399b7386803bf3008a..401c8082e9fbb19e574b84697765d97b5aca64dd 100644 (file)
@@ -292,6 +292,10 @@ void player_setupanimsformodel()
 \r
 void player_anim (void)\r
 {\r
+       // if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
+       if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+               return;\r
+\r
        updateanim(self);\r
        if (self.weaponentity)\r
                updateanim(self.weaponentity);\r