Add "classify" keyvalue to override monster classification.

This commit is contained in:
Julian
2020-06-03 13:57:06 -03:00
parent 1e68434df5
commit 6d4a608793
19 changed files with 116 additions and 7 deletions

View File

@@ -126,13 +126,23 @@ int CMHornet::IRelationship ( CMBaseEntity *pTarget )
//=========================================================
int CMHornet::Classify ( void )
{
/*
if ( pev->owner && pev->owner->v.flags & FL_CLIENT)
{
return CLASS_PLAYER_BIOWEAPON;
}
return CLASS_ALIEN_BIOWEAPON;
*/
// Ensure classify is consistent with the owner, in the event
// it's classification was overriden.
if ( pev->owner == NULL )
return CLASS_ALIEN_BIOWEAPON;
// Ain't this going to make the hornets code "slow"?
CMBaseMonster *pOwner = GetClassPtr((CMBaseMonster *)VARS(pev->owner));
return pOwner->Classify();
}
//=========================================================