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

Method reset

game/state/battle/ai/unitai.cpp:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void AIBlockUnit::reset(GameState &state, BattleUnit &u)
58{
59 ticksLastThink = state.gameTime.getTicks();
60 ticksLastOutOfOrderThink = 0;
61 ticksUntilReThink = randBoundsExclusive(state.rng, 0, (int)TICKS_PER_SECOND);
62
63 for (auto &ai : aiList)
64 {
65 ai->reset(state, u);
66 }
67}
68
69// void AIBlockUnit::reportExecuted(AIAction &action)
70//{

Callers 15

dieMethod · 0.45
startMethod · 0.45
setupMoverMethod · 0.45
initCityMethod · 0.45
battlemap.cppFile · 0.45
dieMethod · 0.45
dieMethod · 0.45
dieMethod · 0.45
initMapMethod · 0.45
initialMapPartRemovalMethod · 0.45
dieMethod · 0.45

Calls 2

randBoundsExclusiveFunction · 0.85
getTicksMethod · 0.80

Tested by

no test coverage detected