From: Rudolf Polzer Date: Thu, 2 May 2013 18:26:45 +0000 (+0200) Subject: try to detect isdead flag (please test) X-Git-Tag: xonotic-v0.7.0~63 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=33ada41dbd9ed5524f272e0fcae66c03ac213906;p=xonotic%2Fxonotic-data.pk3dir.git try to detect isdead flag (please test) --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index a9f8410b4..109b83d16 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -313,6 +313,10 @@ void CSQCPlayer_FallbackFrame_PostUpdate(float isnew) } self.csqcmodel_isdead = IS_DEAD_FRAME(self.frame); } +void CSQCPlayer_AnimDecide_PostUpdate(float isnew) +{ + self.csqcmodel_isdead = !!(self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2)); +} float CSQCPlayer_FallbackFrame(float f) { if(frameduration(self.modelindex, f) > 0) @@ -692,7 +696,9 @@ void CSQCModel_Hook_PostUpdate(float isnew, float isplayer, float islocalplayer) if(self.isplayermodel) { CSQCPlayer_ForceModel_PostUpdate(); - if(!isplayer) + if(isplayer) + CSQCPlayer_AnimDecide_PostUpdate(isnew); + else CSQCPlayer_FallbackFrame_PostUpdate(isnew); } CSQCModel_Effects_PostUpdate();