Fixed an issue with the ForceThisNPCToStopBusy input which caused NPCs to keep acting busy when they shouldn't

This commit is contained in:
Blixibon 2021-04-23 22:57:11 -05:00
parent 45ca64863a
commit 425057453b
2 changed files with 13 additions and 2 deletions

View File

@ -2742,8 +2742,15 @@ void CAI_ActBusyGoal::InputForceThisNPCToStopBusy( inputdata_t &inputdata )
if ( !pBehavior )
return;
if (!IsActive() && pBehavior->GetActBusyGoal() == this)
{
pBehavior->Disable();
}
else
{
// Just stop busying
pBehavior->StopBusying();
}
}
#endif

View File

@ -153,6 +153,10 @@ public:
bool IsInSafeZone( CBaseEntity *pEntity );
int CountEnemiesInSafeZone();
#ifdef MAPBASE
CAI_ActBusyGoal *GetActBusyGoal() const { return m_hActBusyGoal; }
#endif
private:
virtual int SelectSchedule( void );
int SelectScheduleForLeaving( void );