mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-13 23:28:04 +03:00
CHostageImprov::IsFollowing: Fix reverse-engineering mistake
This commit is contained in:
parent
f69afc21a7
commit
49198dc022
@ -136,7 +136,16 @@ public:
|
||||
|
||||
// begin following "leader"
|
||||
void Follow(CBasePlayer *leader) { m_followState.SetLeader(leader); m_behavior.SetState(&m_followState); }
|
||||
bool IsFollowing(const CBaseEntity *leader = nullptr) const { return m_behavior.IsState(&m_followState); }
|
||||
bool IsFollowing(const CBaseEntity *pLeader = nullptr) const
|
||||
{
|
||||
if (!m_behavior.IsState(&m_followState))
|
||||
return false;
|
||||
|
||||
if (pLeader && pLeader != m_followState.GetLeader())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Escape
|
||||
void Escape() { m_behavior.SetState(&m_escapeState); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user