]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix crouching
authorRudolf Polzer <divverent@xonotic.org>
Thu, 22 Nov 2012 15:52:05 +0000 (16:52 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 22 Nov 2012 15:52:05 +0000 (16:52 +0100)
qcsrc/client/csqcmodel_hooks.qc

index ae63e86a6b6009d35b64a4228f3b9a5c82c890a3..18418e968be80efa19e3692ea5245a1c62cf40f5 100644 (file)
@@ -598,6 +598,10 @@ void CSQCModel_Hook_PreDraw(float isplayer)
                                        if(!(self.anim_prev_pmove_flags & PMF_JUMP_HELD))
                                                animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
                                self.anim_prev_pmove_flags = self.pmove_flags;
+                               if(self.pmove_flags & PMF_DUCKED)
+                                       animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, FALSE);
+                               else if(self.anim_state & ANIMSTATE_DUCK)
+                                       animdecide_setstate(self, self.anim_state - ANIMSTATE_DUCK, FALSE);
                        }
                        else
                        {