MCPcopy Create free account
hub / github.com/carbonengine/trinity / FindRandomValidLocator

Method FindRandomValidLocator

trinity/Eve/Turret/EveTurretTarget.cpp:307–325  ·  view source on GitHub ↗

--------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

305
306// --------------------------------------------------------------------------------
307int EveTurretTarget::FindRandomValidLocator( const Vector3& source, Vector3& position ) const
308{
309 if( !m_object )
310 {
311 return -1;
312 }
313
314 int loc = m_object->GetGoodDamageLocatorIndex( source );
315 if( m_object->GetDamageLocatorPosition( &position, loc, true ) )
316 {
317 return loc;
318 }
319 loc = m_object->GetClosestDamageLocatorIndex( &source );
320 if( m_object->GetDamageLocatorPosition( &position, loc, true ) )
321 {
322 return loc;
323 }
324 return -1;
325}
326
327// --------------------------------------------------------------------------------
328// Description:

Callers 1

Tested by

no test coverage detected