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

Function ShieldControl

TombEngine/Objects/Effects/Boss.cpp:87–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 void ShieldControl(int itemNumber)
88 {
89 auto& item = g_Level.Items[itemNumber];
90
91 // Entity life.
92 if (item.ItemFlags[0] > 0)
93 item.ItemFlags[0]--;
94
95 if (item.ItemFlags[0] <= 0)
96 {
97 RemoveActiveItem(itemNumber);
98 KillItem(itemNumber);
99 }
100
101 auto colorEnd = Vector4(item.Model.Color.x - 0.1f, item.Model.Color.y - 0.1f, item.Model.Color.z - 0.1f, item.Model.Color.w);
102 item.Model.Color = Vector4::Lerp(item.Model.Color, colorEnd, 0.35f);
103 item.Pose.Orientation.y += Random::GenerateAngle();
104 UpdateItemRoom(itemNumber);
105 }
106
107 // NOTE: Ring and explosion wave rotate and scale by default.
108 void ShockwaveRingControl(int itemNumber)

Callers

nothing calls this directly

Calls 6

RemoveActiveItemFunction · 0.85
KillItemFunction · 0.85
LerpFunction · 0.85
GenerateAngleFunction · 0.85
UpdateItemRoomFunction · 0.85
Vector4Function · 0.50

Tested by

no test coverage detected