MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / WraithTrapControl

Function WraithTrapControl

TombEngine/Objects/TR4/Object/WraithTrap.cpp:30–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 void WraithTrapControl(short itemNumber)
31 {
32 auto& item = g_Level.Items[itemNumber];
33
34 if (TriggerActive(&item))
35 {
36 if (item.ItemFlags[6] && item.TriggerFlags > 0)
37 {
38 auto pos = GetJointPosition(&item, 0, Vector3i::Zero);
39
40 SoundEffect(SFX_TR4_LIGHT_BEAM_LOOP, &Pose(pos));
41
42 auto color = Vector3(255.0f);
43 TriggerAttackSpark(pos.ToVector3(), color);
44 }
45 }
46 }
47}

Callers

nothing calls this directly

Calls 7

TriggerActiveFunction · 0.85
GetJointPositionFunction · 0.85
SoundEffectFunction · 0.85
TriggerAttackSparkFunction · 0.85
PoseClass · 0.50
Vector3Function · 0.50
ToVector3Method · 0.45

Tested by

no test coverage detected