The
Classify()
method is used by the monster to return which classification it belongs to, and IRelationship(CBaseEntity* pTarget)
method is used to find the monster's relation to a target monster.I guess you could override the
IRelationship
method in both hgrunt.cpp
and islave.cpp
to check if the target's classname is the opposite and return R_AL
(-2, ally), something like:
if (FClassnameIs(pTarget->pev, "monster_human_grunt"))
{
return R_AL;
}
Since both monsters already override that method with special handling, I'd suggest adding this check at the start of the method.