mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 06:45:31 +03:00
Fixed issues with unique cases in companion readiness
This commit is contained in:
parent
7dab039099
commit
013da89b27
@ -1956,10 +1956,9 @@ bool CNPC_PlayerCompanion::IsReadinessCapable()
|
||||
{
|
||||
// Rather than looking up the activity string, we just make sure our weapon accepts a few basic readiness activity overrides.
|
||||
// This lets us make sure our weapon is readiness-capable to begin with.
|
||||
CBaseCombatWeapon *pWeapon = GetActiveWeapon();
|
||||
if ( pWeapon->ActivityOverride(ACT_IDLE_RELAXED, NULL) == ACT_IDLE_RELAXED &&
|
||||
pWeapon->ActivityOverride( ACT_IDLE_STIMULATED, NULL ) == ACT_IDLE_STIMULATED &&
|
||||
pWeapon->ActivityOverride( ACT_IDLE_AGITATED, NULL ) == ACT_IDLE_AGITATED )
|
||||
if ( TranslateActivity( ACT_IDLE_RELAXED ) == ACT_IDLE_RELAXED &&
|
||||
TranslateActivity( ACT_IDLE_STIMULATED ) == ACT_IDLE_STIMULATED &&
|
||||
TranslateActivity( ACT_IDLE_AGITATED ) == ACT_IDLE_AGITATED )
|
||||
return false;
|
||||
|
||||
if (LookupActivity( "ACT_IDLE_AIM_RIFLE_STIMULATED" ) == ACT_INVALID)
|
||||
@ -2797,6 +2796,21 @@ void CNPC_PlayerCompanion::Weapon_Equip( CBaseCombatWeapon *pWeapon )
|
||||
m_bReadinessCapable = IsReadinessCapable();
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CNPC_PlayerCompanion::DoUnholster()
|
||||
{
|
||||
if ( BaseClass::DoUnholster() )
|
||||
{
|
||||
m_bReadinessCapable = IsReadinessCapable();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
void CNPC_PlayerCompanion::PickupWeapon( CBaseCombatWeapon *pWeapon )
|
||||
|
@ -282,6 +282,9 @@ public:
|
||||
bool ShouldLookForBetterWeapon();
|
||||
bool Weapon_CanUse( CBaseCombatWeapon *pWeapon );
|
||||
void Weapon_Equip( CBaseCombatWeapon *pWeapon );
|
||||
#ifdef MAPBASE
|
||||
bool DoUnholster( void );
|
||||
#endif
|
||||
void PickupWeapon( CBaseCombatWeapon *pWeapon );
|
||||
|
||||
#if COMPANION_MELEE_ATTACK
|
||||
|
Loading…
Reference in New Issue
Block a user