mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-14 21:42:30 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !CBaseCombatCharacter::DefaultRelationshipsLoaded() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( m_iPreviousDisposition == -1 && iReverting == NOT_REVERTING )
|
if ( m_iPreviousDisposition == -1 && iReverting == NOT_REVERTING )
|
||||||
{
|
{
|
||||||
// Set previous disposition.
|
// Set previous disposition.
|
||||||
|
@ -3239,6 +3239,16 @@ void CBaseCombatCharacter::SetDefaultRelationship(Class_T nClass, Class_T nClass
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAPBASE
|
#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
|
// Purpose: Fetch the default (ignore ai_relationship changes) relationship
|
||||||
// Input :
|
// Input :
|
||||||
|
@ -462,6 +462,7 @@ public:
|
|||||||
static void AllocateDefaultRelationships( );
|
static void AllocateDefaultRelationships( );
|
||||||
static void SetDefaultRelationship( Class_T nClass, Class_T nClassTarget, Disposition_t nDisposition, int nPriority );
|
static void SetDefaultRelationship( Class_T nClass, Class_T nClassTarget, Disposition_t nDisposition, int nPriority );
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
|
static bool DefaultRelationshipsLoaded();
|
||||||
static Disposition_t GetDefaultRelationshipDisposition( Class_T nClassSource, Class_T nClassTarget );
|
static Disposition_t GetDefaultRelationshipDisposition( Class_T nClassSource, Class_T nClassTarget );
|
||||||
static int GetDefaultRelationshipPriority( Class_T nClassSource, Class_T nClassTarget );
|
static int GetDefaultRelationshipPriority( Class_T nClassSource, Class_T nClassTarget );
|
||||||
int GetDefaultRelationshipPriority( Class_T nClassTarget );
|
int GetDefaultRelationshipPriority( Class_T nClassTarget );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user