SetClassRelationship function for VScript

This commit is contained in:
ALLEN-PC\acj30 2023-11-24 10:45:56 -06:00
parent 5fe4621eb6
commit 6a0a0154c6
2 changed files with 9 additions and 0 deletions

View File

@ -175,6 +175,7 @@ BEGIN_ENT_SCRIPTDESC( CBaseCombatCharacter, CBaseFlex, "The base class shared by
DEFINE_SCRIPTFUNC_NAMED( ScriptRelationType, "GetRelationship", "Get a character's relationship to a specific entity." )
DEFINE_SCRIPTFUNC_NAMED( ScriptRelationPriority, "GetRelationPriority", "Get a character's relationship priority for a specific entity." )
DEFINE_SCRIPTFUNC_NAMED( ScriptSetRelationship, "SetRelationship", "Set a character's relationship with a specific entity." )
DEFINE_SCRIPTFUNC_NAMED( ScriptSetClassRelationship, "SetClassRelationship", "Set a character's relationship with a specific Classify() class." )
DEFINE_SCRIPTFUNC_NAMED( ScriptGetVehicleEntity, "GetVehicleEntity", "Get the entity for a character's current vehicle if they're in one." )
@ -4663,6 +4664,13 @@ void CBaseCombatCharacter::ScriptSetRelationship( HSCRIPT pTarget, int dispositi
AddEntityRelationship( ToEnt( pTarget ), (Disposition_t)disposition, priority );
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CBaseCombatCharacter::ScriptSetClassRelationship( int classify, int disposition, int priority )
{
AddClassRelationship( (Class_T)classify, (Disposition_t)disposition, priority);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
HSCRIPT CBaseCombatCharacter::ScriptGetVehicleEntity()

View File

@ -440,6 +440,7 @@ public:
int ScriptRelationType( HSCRIPT pTarget );
int ScriptRelationPriority( HSCRIPT pTarget );
void ScriptSetRelationship( HSCRIPT pTarget, int disposition, int priority );
void ScriptSetClassRelationship( int classify, int disposition, int priority );
HSCRIPT ScriptGetVehicleEntity();