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

View file

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