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

Function UpdateFootprints

TombEngine/Game/effects/footprint.cpp:197–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 }
196
197 void UpdateFootprints()
198 {
199 if (Footprints.empty())
200 return;
201
202 for (auto& footprint: Footprints)
203 {
204 if (footprint.Life <= 0.0f)
205 continue;
206
207 // Update opacity.
208 if (footprint.Life <= footprint.LifeStartFading)
209 {
210 float alpha = 1.0f - (footprint.Life / footprint.LifeStartFading);
211 footprint.Opacity = Lerp(footprint.OpacityStart, 0.0f, alpha);
212 }
213
214 // Update life.
215 footprint.Life -= 1.0f;
216 }
217
218 ClearInactiveEffects(Footprints);
219 }
220
221 void ClearFootprints()
222 {

Callers 1

GamePhaseFunction · 0.85

Calls 3

LerpFunction · 0.85
ClearInactiveEffectsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected