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

Method Start

trinity/Eve/SpaceObject/EveMissile.cpp:340–356  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: This function is exposed to python and called from the missile spaceobject, as soon as it is created in destiny. It sets/initializes some timers, also disables all particle emitting (that gets turned on later, when we are in the correct warhead's state). Arguments: shipVelocity - the firing ship's velocit

Source from the content-addressed store, hash-verified

338// estimatedFlyingTime - a rough estimate for flying time coming from python
339// --------------------------------------------------------------------------------
340void EveMissile::Start( const Vector3& shipVelocity, float estimatedFlyingTime )
341{
342 // ship data
343 m_inheritedVelocity = shipVelocity;
344 m_estimatedTotalAliveTime = estimatedFlyingTime;
345
346 // disable particle emitting here, it will get enabled in a later state of each warhead
347 for( PEveMissileWarheadVector::const_iterator it = m_warheads.begin(); it != m_warheads.end(); ++it )
348 {
349 ( *it )->EnableParticleEmitting( false );
350 }
351
352 // start!
353 m_time = 0.f;
354 m_inheritedStartVelocity = m_inheritedVelocity;
355 m_lastValidSpeed = 0.f;
356}
357
358// --------------------------------------------------------------------------------
359// Description:

Callers 4

StartControllersMethod · 0.45
StartControllersMethod · 0.45
StartControllersMethod · 0.45
StartControllersMethod · 0.45

Calls 3

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected