o fixed the +use oddities for aliens.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@457 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2006-05-07 09:25:32 +00:00
parent 57ed86bd75
commit 345565f752
1 changed files with 7 additions and 4 deletions

View File

@ -1783,11 +1783,14 @@ void CBasePlayer::PlayerUse ( void )
while ((pObject = UTIL_FindEntityInSphere( pObject, pev->origin, PLAYER_SEARCH_RADIUS*3)) != NULL)
{
if ( pObject->pev->iuser3 != AVH_USER3_HIVE ) {
vec3_t objectLocation;
AvHSHUGetEntityLocation(pObject->entindex(), objectLocation);
double distance=VectorDistance(objectLocation, pev->origin);
vec3_t myOrigin=pev->origin + pev->view_ofs;
vec3_t objectLocation=pObject->BodyTarget(myOrigin);
//AvHSHUGetEntityLocation(pObject->entindex(), objectLocation);
float distance=VectorDistance(objectLocation, myOrigin);
if ( distance > PLAYER_SEARCH_RADIUS ) {
ALERT(at_console, "skipping %d\n", pObject->entindex());
continue;
}
}