mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 23:37:58 +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.
|
// 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.
|
// This lets us make sure our weapon is readiness-capable to begin with.
|
||||||
CBaseCombatWeapon *pWeapon = GetActiveWeapon();
|
if ( TranslateActivity( ACT_IDLE_RELAXED ) == ACT_IDLE_RELAXED &&
|
||||||
if ( pWeapon->ActivityOverride(ACT_IDLE_RELAXED, NULL) == ACT_IDLE_RELAXED &&
|
TranslateActivity( ACT_IDLE_STIMULATED ) == ACT_IDLE_STIMULATED &&
|
||||||
pWeapon->ActivityOverride( ACT_IDLE_STIMULATED, NULL ) == ACT_IDLE_STIMULATED &&
|
TranslateActivity( ACT_IDLE_AGITATED ) == ACT_IDLE_AGITATED )
|
||||||
pWeapon->ActivityOverride( ACT_IDLE_AGITATED, NULL ) == ACT_IDLE_AGITATED )
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (LookupActivity( "ACT_IDLE_AIM_RIFLE_STIMULATED" ) == ACT_INVALID)
|
if (LookupActivity( "ACT_IDLE_AIM_RIFLE_STIMULATED" ) == ACT_INVALID)
|
||||||
@ -2797,6 +2796,21 @@ void CNPC_PlayerCompanion::Weapon_Equip( CBaseCombatWeapon *pWeapon )
|
|||||||
m_bReadinessCapable = IsReadinessCapable();
|
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 )
|
void CNPC_PlayerCompanion::PickupWeapon( CBaseCombatWeapon *pWeapon )
|
||||||
|
@ -282,6 +282,9 @@ public:
|
|||||||
bool ShouldLookForBetterWeapon();
|
bool ShouldLookForBetterWeapon();
|
||||||
bool Weapon_CanUse( CBaseCombatWeapon *pWeapon );
|
bool Weapon_CanUse( CBaseCombatWeapon *pWeapon );
|
||||||
void Weapon_Equip( CBaseCombatWeapon *pWeapon );
|
void Weapon_Equip( CBaseCombatWeapon *pWeapon );
|
||||||
|
#ifdef MAPBASE
|
||||||
|
bool DoUnholster( void );
|
||||||
|
#endif
|
||||||
void PickupWeapon( CBaseCombatWeapon *pWeapon );
|
void PickupWeapon( CBaseCombatWeapon *pWeapon );
|
||||||
|
|
||||||
#if COMPANION_MELEE_ATTACK
|
#if COMPANION_MELEE_ATTACK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user