]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
Make sure that only the animation info of the normal player model is used, with a...
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index 36542cf7a760f29c6e0363399b7386803bf3008a..e282ed37e836a32238750c3469e776cd4bc29306 100644 (file)
@@ -218,6 +218,10 @@ float player_getspecies()
 \r
 void player_setupanimsformodel()\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
        local string animfilename;\r
        local float animfile;\r
        // defaults for legacy .zym models without animinfo files\r
@@ -245,7 +249,7 @@ void player_setupanimsformodel()
        self.anim_backright = '21 1 1';\r
        self.anim_backleft  = '22 1 1';\r
        animparseerror = FALSE;\r
-       animfilename = strcat(self.model, ".animinfo");\r
+       animfilename = strcat(self.playermodel, ".animinfo"); // only the normal player model may contain animation info\r
        animfile = fopen(animfilename, FILE_READ);\r
        if (animfile >= 0)\r
        {\r
@@ -282,16 +286,16 @@ void player_setupanimsformodel()
        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
 {\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
@@ -745,7 +749,6 @@ void ClearSelectedPlayer()
        }\r
 }\r
 \r
-.float dropweapon_check;\r
 void UpdateSelectedPlayer()\r
 {\r
        entity selected;\r