mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-12 23:07:55 +03:00
Fix ai_relationship_classify applying before default relationships loaded
This commit is contained in:
parent
aa03b6b51e
commit
0e110b7823
@ -615,6 +615,9 @@ void CAI_ClassRelationship::ChangeRelationships( int disposition, int iReverting
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !CBaseCombatCharacter::DefaultRelationshipsLoaded() )
|
||||
return;
|
||||
|
||||
if ( m_iPreviousDisposition == -1 && iReverting == NOT_REVERTING )
|
||||
{
|
||||
// Set previous disposition.
|
||||
|
@ -3239,6 +3239,16 @@ void CBaseCombatCharacter::SetDefaultRelationship(Class_T nClass, Class_T nClass
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Determine whether or not default relationships are loaded
|
||||
// Input :
|
||||
// Output :
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CBaseCombatCharacter::DefaultRelationshipsLoaded()
|
||||
{
|
||||
return m_DefaultRelationship != NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Fetch the default (ignore ai_relationship changes) relationship
|
||||
// Input :
|
||||
|
@ -462,6 +462,7 @@ public:
|
||||
static void AllocateDefaultRelationships( );
|
||||
static void SetDefaultRelationship( Class_T nClass, Class_T nClassTarget, Disposition_t nDisposition, int nPriority );
|
||||
#ifdef MAPBASE
|
||||
static bool DefaultRelationshipsLoaded();
|
||||
static Disposition_t GetDefaultRelationshipDisposition( Class_T nClassSource, Class_T nClassTarget );
|
||||
static int GetDefaultRelationshipPriority( Class_T nClassSource, Class_T nClassTarget );
|
||||
int GetDefaultRelationshipPriority( Class_T nClassTarget );
|
||||
|
Loading…
x
Reference in New Issue
Block a user