From: Rudolf Polzer Date: Thu, 22 Nov 2012 15:52:05 +0000 (+0100) Subject: fix crouching X-Git-Tag: xonotic-v0.7.0~99^2~32 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a739acfd4d02821df28e7ec022eb98661bee76bd;p=xonotic%2Fxonotic-data.pk3dir.git fix crouching --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index ae63e86a6..18418e968 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -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 {