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

Method Start

trinity/Controllers/Actions/Tr2ActionOverlay.cpp:18–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void Tr2ActionOverlay::Start( ITr2ActionController& controller )
19{
20 EveSpaceObject2Ptr owner = BlueCastPtr( controller.GetOwner() );
21 bool rebind = false;
22
23 if( !owner )
24 {
25 if( !m_targetAnotherOwner.empty() )
26 {
27 if( EveMultiEffectPtr multiEffect = BlueCastPtr( controller.GetOwner() ) )
28 {
29 if( EveMultiEffectParameterPtr mep = multiEffect->GetParameterByName( m_targetAnotherOwner ) )
30 {
31 owner = BlueCastPtr( mep->GetParameterObject() );
32 }
33 }
34 else if( EveStretch3Ptr stretch3 = BlueCastPtr( controller.GetOwner() ) )
35 {
36 IEveSpaceObject2Ptr obj;
37
38 if( m_targetAnotherOwner == BlueSharedString( "SourceSpaceObject" ) )
39 {
40 obj = stretch3->GetSourceSpaceObject();
41 }
42
43 if( m_targetAnotherOwner == BlueSharedString( "DestSpaceObject" ) )
44 {
45 obj = stretch3->GetDestSpaceObject();
46 }
47
48 if( obj )
49 {
50 owner = BlueCastPtr( obj );
51 }
52 }
53 }
54
55 if( !owner )
56 {
57 return;
58 }
59 rebind = true;
60 }
61
62 LoadOverlay( owner );
63
64 if( rebind )
65 {
66 if( EveMultiEffectPtr multiEffect = BlueCastPtr( controller.GetOwner() ) )
67 {
68 multiEffect->Rebind( true );
69 }
70 else if( EveStretch3Ptr stretch3 = BlueCastPtr( controller.GetOwner() ) )
71 {
72 stretch3->Rebind( true );
73 }
74 }
75}

Callers

nothing calls this directly

Calls 7

emptyMethod · 0.80
GetParameterObjectMethod · 0.80
GetSourceSpaceObjectMethod · 0.80
GetDestSpaceObjectMethod · 0.80
GetOwnerMethod · 0.45
GetParameterByNameMethod · 0.45
RebindMethod · 0.45

Tested by

no test coverage detected