weird... this code is NOT crashing...
Code:
if ( UTIL_IsPlayer(pEnt) )
{
// it's a player...
// lets see if this monster shares same team as player if team based mod...
if((pev->team != pEnt->v.team) || (pEnt->v.team == 0))
{
// testing
printf("*** MONSTER TEAM IS %i\n",pev->team);
printf("*** MONSTER'S ENEMY TEAM IS %i\n",pEnt->v.team);
}
iDist = ( pEnt->v.origin - pev->origin ).Length();
if ( iDist <= iNearest )
{
iNearest = iDist;
iBestRelationship = R_NM; // player is always nemsis
pReturn = pEnt;
}
}