Removed Player::FindEnemyInFOV and Player::FindEnemyInFOVFromTagWithOffset (unused)

This commit is contained in:
smallmodel 2023-08-02 20:58:47 +02:00
parent a498b11e20
commit ce02d782c4
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -95,44 +95,6 @@ static Entity *FindClosestEntityInRadius
return bestent;
}
Entity *Player::FindEnemyInFOVFromTagWithOffset
(
float fov,
float maxdist,
str tagname,
Vector offset
)
{
vec3_t mat[3];
orientation_t tag_or;
GetTagPositionAndOrientation( gi.Tag_NumForName( edict->tiki, tagname ), &tag_or );
AnglesToAxis( torsoAngles, mat );
//G_DebugLine( tag_or.origin + offset, tag_or.origin + offset + Vector( mat[0] ) * 100, 1,1,1,1 );
return FindClosestEntityInRadius( tag_or.origin + offset, mat[0], fov, maxdist );
}
//====================
//FindEnemyInFOV
//Returns entity if an enemy is in the player's FOV
//====================
Entity *Player::FindEnemyInFOV
(
float fov,
float maxdist
)
{
vec3_t mat[3];
AnglesToAxis( headAngles, mat );
return FindClosestEntityInRadius( this->centroid, mat[0], fov, maxdist );
}
//====================
//AdjustAnglesForAttack
//Adjust the player angles toward an enemy if they are attacking it