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

Function ShockwaveExplosionControl

TombEngine/Objects/Effects/Boss.cpp:134–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 void ShockwaveExplosionControl(int itemNumber)
135 {
136 auto& item = g_Level.Items[itemNumber];
137
138 // Entity life.
139 if (item.ItemFlags[0] > 0)
140 item.ItemFlags[0]--;
141
142 if (item.ItemFlags[0] <= 0)
143 {
144 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);
145 item.Model.Color = Vector4::Lerp(item.Model.Color, colorEnd, 0.35f);
146
147 if (item.Model.Color.x <= 0.0f &&
148 item.Model.Color.y <= 0.0f &&
149 item.Model.Color.z <= 0.0f)
150 {
151 RemoveActiveItem(itemNumber);
152 KillItem(itemNumber);
153 }
154 }
155
156 item.Pose.Orientation.y += ANGLE(5.0f);
157 item.Model.Mutators[0].Scale += Vector3(0.5f);
158 UpdateItemRoom(itemNumber);
159 }
160
161 void SpawnExplosionSmoke(const Vector3& pos)
162 {

Callers

nothing calls this directly

Calls 7

LerpFunction · 0.85
RemoveActiveItemFunction · 0.85
KillItemFunction · 0.85
ANGLEFunction · 0.85
UpdateItemRoomFunction · 0.85
Vector4Function · 0.50
Vector3Function · 0.50

Tested by

no test coverage detected