MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / update

Method update

game/state/shared/doodad.cpp:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void Doodad::update(GameState &state, int ticks)
28{
29 if (!temporary)
30 return;
31 age += ticks;
32 if (age >= lifetime)
33 {
34 if (this->type->repeatable)
35 {
36 age = 0;
37 return;
38 }
39 this->remove(state);
40 return;
41 }
42}
43
44void Doodad::remove(GameState &state)
45{

Callers

nothing calls this directly

Calls 1

removeMethod · 0.95

Tested by

no test coverage detected