From abc34c0c85df254becdbb338739f217e2176ef21 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Mon, 15 Nov 2021 14:45:32 -0600 Subject: [PATCH] Added holstered activity handling for players --- sp/src/game/server/player.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sp/src/game/server/player.cpp b/sp/src/game/server/player.cpp index 1f52ea4f..659eb748 100644 --- a/sp/src/game/server/player.cpp +++ b/sp/src/game/server/player.cpp @@ -7819,6 +7819,11 @@ Activity CBasePlayer::Weapon_TranslateActivity( Activity baseAct, bool *pRequire { Activity weaponTranslation = BaseClass::Weapon_TranslateActivity( baseAct, pRequired ); + if ( GetActiveWeapon() && GetActiveWeapon()->IsEffectActive(EF_NODRAW) && baseAct != ACT_ARM ) + { + // Our weapon is holstered. Use the base activity. + return baseAct; + } if ( GetModelPtr() && !GetModelPtr()->HaveSequenceForActivity(weaponTranslation) ) { // This is used so players can fall back to backup activities in the same way NPCs in Mapbase can