-------------------------------------------------------------------------------- Description: Find the best locator ID and it's position for a given source (aka gun) position --------------------------------------------------------------------------------
| 287 | // Find the best locator ID and it's position for a given source (aka gun) position |
| 288 | // -------------------------------------------------------------------------------- |
| 289 | int EveTurretTarget::FindClosestLocator( const Vector3* source, Vector3* position ) const |
| 290 | { |
| 291 | // do we have a target object? |
| 292 | if( !m_object ) |
| 293 | { |
| 294 | return -1; |
| 295 | } |
| 296 | |
| 297 | // find closest locator to source |
| 298 | int loc = m_object->GetClosestDamageLocatorIndex( source ); |
| 299 | if( !m_object->GetDamageLocatorPosition( position, loc, true ) ) |
| 300 | { |
| 301 | return -1; |
| 302 | } |
| 303 | return loc; |
| 304 | } |
| 305 | |
| 306 | // -------------------------------------------------------------------------------- |
| 307 | int EveTurretTarget::FindRandomValidLocator( const Vector3& source, Vector3& position ) const |
no test coverage detected