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

Method UpdateEndTransform

trinity/Eve/SpaceObject/EveMissileWarhead.cpp:329–342  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Called to update this warhead's destination, with a possible indication that a new target (locator) is chosen. Arguments: endTransform - the endtransform of the final destination of this warhead switchLocators - if true the target has changed and the warhead can react ot it -------------------------------

Source from the content-addressed store, hash-verified

327// switchLocators - if true the target has changed and the warhead can react ot it
328// --------------------------------------------------------------------------------
329void EveMissileWarhead::UpdateEndTransform( const Matrix& endTransform, bool switchLocators )
330{
331 // warhead data: translation offset is all we want for now, no rotation
332 m_endOffset = Vector3( endTransform._41, endTransform._42, endTransform._43 );
333
334 if( switchLocators )
335 {
336 // start timing of the final part of this flight by remebering when it started!
337 m_finalDestinationTimer = m_flyingTime;
338
339 // remember offset so we can nicely lerp to new offset
340 m_oldEndOffset = m_currentEndOffset;
341 }
342}
343
344// --------------------------------------------------------------------------------
345// Description:

Callers 1

UpdateSyncronousMethod · 0.80

Calls 1

Vector3Class · 0.50

Tested by

no test coverage detected