mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-27 07:15:31 +03:00
Added holstered activity handling for players
This commit is contained in:
parent
41d799bbdf
commit
abc34c0c85
@ -7819,6 +7819,11 @@ Activity CBasePlayer::Weapon_TranslateActivity( Activity baseAct, bool *pRequire
|
|||||||
{
|
{
|
||||||
Activity weaponTranslation = BaseClass::Weapon_TranslateActivity( baseAct, pRequired );
|
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) )
|
if ( GetModelPtr() && !GetModelPtr()->HaveSequenceForActivity(weaponTranslation) )
|
||||||
{
|
{
|
||||||
// This is used so players can fall back to backup activities in the same way NPCs in Mapbase can
|
// This is used so players can fall back to backup activities in the same way NPCs in Mapbase can
|
||||||
|
Loading…
Reference in New Issue
Block a user