]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
Attempt to fix multiplayer animation issue found in 0.5.1. This also fixes a dumb...
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index 36542cf7a760f29c6e0363399b7386803bf3008a..41dc8f40dca6a1dba7f53d1ab1e7abd1987302a2 100644 (file)
@@ -282,16 +282,17 @@ void player_setupanimsformodel()
        else\r
                dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n");\r
 \r
        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
+       // if this is the stomach model (or any model that can't be animated), don't attempt to animate\r
+       if not(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension\r
+               setanim(self, self.anim_idle, TRUE, FALSE, TRUE);\r
 };\r
 \r
 void player_anim (void)\r
 {\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
        updateanim(self);\r
        if (self.weaponentity)\r
                updateanim(self.weaponentity);\r
@@ -745,7 +746,6 @@ void ClearSelectedPlayer()
        }\r
 }\r
 \r
        }\r
 }\r
 \r
-.float dropweapon_check;\r
 void UpdateSelectedPlayer()\r
 {\r
        entity selected;\r
 void UpdateSelectedPlayer()\r
 {\r
        entity selected;\r