Fix ai_relationship_classify not working properly after loading save

This commit is contained in:
ALLEN-PC\acj30 2023-11-24 10:27:48 -06:00
parent 650ddeeceb
commit e7cdb69c58

View File

@ -532,6 +532,7 @@ public:
// Must override CAI_Relationship
void Spawn() { m_bIsActive = false; }
void Activate();
bool KeyValue( const char *szKeyName, const char *szValue );
@ -557,6 +558,19 @@ BEGIN_DATADESC( CAI_ClassRelationship )
END_DATADESC()
//---------------------------------------------------------
//---------------------------------------------------------
void CAI_ClassRelationship::Activate()
{
BaseClass::Activate();
// Must re-apply every time a save is loaded
if ( m_bIsActive )
{
ApplyRelationship();
}
}
//-----------------------------------------------------------------------------
// Purpose: Caches entity key values until spawn is called.
// Input : szKeyName -