From 07d8d7657a8ddc3f2bf1a79cea9260838c276e97 Mon Sep 17 00:00:00 2001 From: aurhat Date: Sat, 7 Oct 2017 20:42:20 +0200 Subject: [PATCH] Remove attack animation of clients during grenade activation --- source/src/rendermodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index c6be403a..4967c93e 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -981,7 +981,7 @@ void renderclient(playerent *d, const char *mdlname, const char *vwepname, int t else if(d->state==CS_EDITING) { anim = ANIM_JUMP|ANIM_END; } else if(d->state==CS_LAGGED) { anim = ANIM_SALUTE|ANIM_LOOP|ANIM_TRANSLUCENT; } else if(lastmillis-d->lastpain<300) { anim = d->crouching ? ANIM_CROUCH_PAIN : ANIM_PAIN; speed = 300.0f/4; basetime = d->lastpain; } - else if(d->weaponsel==d->lastattackweapon && lastmillis-d->lastaction<300 && d->lastpain < d->lastaction && !d->weaponsel->reloading && (d->weaponsel->type != GUN_GRENADE || ((grenades *)d->weaponsel)->cookingmillis)) + else if(d->weaponsel==d->lastattackweapon && lastmillis-d->lastaction<300 && d->lastpainlastaction && !d->weaponsel->reloading && (d->weaponsel->type!=GUN_GRENADE || ((grenades *)d->weaponsel)->cookingmillis>0)) { anim = d->crouching ? ANIM_CROUCH_ATTACK : ANIM_ATTACK; speed = 300.0f/8; basetime = d->lastaction; } else if(!d->onfloor && d->timeinair>50) { anim = (d->crouching ? ANIM_CROUCH_WALK : ANIM_JUMP)|ANIM_END; } else if(!d->move && !d->strafe) { anim = (d->crouching ? ANIM_CROUCH_IDLE : ANIM_IDLE)|ANIM_LOOP; }