mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 23:05:30 +03:00
Added keyvalue to ai_goal_follow to enable normal memory discard duration
This commit is contained in:
parent
08dcf3ffff
commit
4d4296dac2
@ -408,10 +408,11 @@ bool CAI_FollowBehavior::SetFollowGoal( CAI_FollowGoal *pGoal, bool fFinishCurSc
|
||||
SetFollowTarget( pGoal->GetGoalEntity() );
|
||||
#ifdef MAPBASE
|
||||
Assert( pGoal->m_iFormation < AIF_NUM_FORMATIONS );
|
||||
SetParameters( AI_FollowParams_t( (AI_Formations_t)pGoal->m_iFormation, pGoal->m_bNormalMemoryDiscard ) );
|
||||
#else
|
||||
Assert( pGoal->m_iFormation == AIF_SIMPLE || pGoal->m_iFormation == AIF_WIDE || pGoal->m_iFormation == AIF_MEDIUM || pGoal->m_iFormation == AIF_SIDEKICK || pGoal->m_iFormation == AIF_VORTIGAUNT );
|
||||
#endif
|
||||
SetParameters( AI_FollowParams_t( (AI_Formations_t)pGoal->m_iFormation ) );
|
||||
#endif
|
||||
m_hFollowGoalEnt = pGoal;
|
||||
m_flTimeUpdatedFollowPosition = 0;
|
||||
return true;
|
||||
@ -2138,6 +2139,9 @@ bool CAI_FollowBehavior::ShouldAlwaysThink()
|
||||
|
||||
BEGIN_DATADESC( CAI_FollowGoal )
|
||||
DEFINE_KEYFIELD( m_iFormation, FIELD_INTEGER, "Formation" ),
|
||||
#ifdef MAPBASE
|
||||
DEFINE_KEYFIELD( m_bNormalMemoryDiscard, FIELD_BOOLEAN, "NormalMemoryDiscard" ),
|
||||
#endif
|
||||
|
||||
#ifdef HL2_EPISODIC
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "OutsideTransition", InputOutsideTransition ),
|
||||
|
@ -71,6 +71,10 @@ public:
|
||||
|
||||
int m_iFormation;
|
||||
|
||||
#ifdef MAPBASE
|
||||
bool m_bNormalMemoryDiscard = false;
|
||||
#endif
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user