| 160 | // -------------------------------------------------------------------------------- |
| 161 | |
| 162 | void EveTurretTarget::GetImpactPosition( Vector3& out, const Vector3* source ) |
| 163 | { |
| 164 | if( m_object ) |
| 165 | { |
| 166 | if( m_impactBehaviour == ImpactBehaviour::DAMAGE_LOCATOR ) |
| 167 | { |
| 168 | m_object->GetDamageLocatorPosition( &out, m_locator, true ); |
| 169 | |
| 170 | if( LengthSq( out ) > 22379561604000000000000.f ) // AU squared |
| 171 | { |
| 172 | out = m_objectPos->GetWorldPosition(); |
| 173 | } |
| 174 | } |
| 175 | else if( m_impactBehaviour == ImpactBehaviour::CENTER ) |
| 176 | { |
| 177 | out = m_objectPos->GetWorldPosition(); |
| 178 | } |
| 179 | else if( m_impactBehaviour == ImpactBehaviour::SHIELD_ELLIPSOID ) |
| 180 | { |
| 181 | if( !m_object->GetImpactPosition( out, m_locator, *source, m_objectPos->GetWorldPosition(), 0 ) ) |
| 182 | { |
| 183 | // handle when we are inside the shield ellipsoid |
| 184 | m_object->GetDamageLocatorPosition( &out, m_locator, true ); |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // -------------------------------------------------------------------------------- |
| 191 | // Description: |
nothing calls this directly
no test coverage detected