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

Method EveMissileWarhead

trinity/Eve/SpaceObject/EveMissileWarhead.cpp:24–64  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Initialize data members, set everything to inlavid/empty. And init some random values we keep to make this warhead visually unique. --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

22// random values we keep to make this warhead visually unique.
23// --------------------------------------------------------------------------------
24EveMissileWarhead::EveMissileWarhead( IRoot* lockobj ) :
25 EveTransform( lockobj ),
26 m_warheadLength( 1 ),
27 m_warheadRadius( 1 ),
28 m_state( STATE_DELAYED ),
29 m_flyingTime( 0.f ),
30 m_impactDuration( 0.6f ),
31 m_impactSize( 0.f ),
32 m_posLastFrame( 0.f, 0.f, 0.f ),
33 m_currentStartOffset( 0.f, 0.f, 0.f ),
34 m_startOrientation( 0.f, 0.f, 0.f, 1.f ),
35 m_startDataValid( false ),
36 m_oldEndOffset( 0.f, 0.f, 0.f ),
37 m_currentEndOffset( 0.f, 0.f, 0.f ),
38 m_endOffset( 0.f, 0.f, 0.f ),
39 m_currentOffset( 0.f, 0.f, 0.f ),
40 m_currentOrientation( 0.f, 0.f, 0.f, 1.f ),
41 m_currentEjectVelocity( 0.f ),
42 m_currentDurationEjectPhase( 0.f ),
43 m_finalDestinationTimer( 0.f ),
44 m_finalTargetTime( 0.f ),
45 m_pathOffset( 0.f, 0.f, 0.f ),
46 m_durationEjectPhase( 0.f ),
47 m_startEjectVelocity( 0.f ),
48 m_acceleration( 1.f ),
49 m_targetLocator( -1 ),
50 m_id( -1 ),
51 m_speedModifier( 1.0f ),
52 m_explosionDistance( 0.0f ),
53 m_maxExplosionDistance( 40.0f ),
54 m_explosionPosition( 0.f, 0.f, 0.f ),
55 m_bombFlightpath( false ),
56 m_doSpread( true ),
57 m_lastPositionValid( false ),
58 m_currentOffsetTransform( IdentityMatrix() ),
59 m_pathOffsetNoiseScale( 0 ),
60 m_pathOffsetNoiseSpeed( 1 )
61{
62 m_speedModifier = 1.04f - TriRand() * 0.08f;
63 m_finalTargetTime = 0.75f - TriRand() * 0.1f;
64}
65
66// --------------------------------------------------------------------------------
67// Description:

Callers

nothing calls this directly

Calls 1

TriRandFunction · 0.85

Tested by

no test coverage detected