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

Method notifyAction

game/state/battle/battle.cpp:1883–1900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1881}
1882
1883void Battle::notifyAction(Vec3<int> location, StateRef<BattleUnit> actorUnit)
1884{
1885 ticksWithoutAction = 0;
1886 if (location == EventMessage::NO_LOCATION)
1887 {
1888 return;
1889 }
1890 for (auto &p : participants)
1891 {
1892 if (actorUnit && actorUnit->owner != p &&
1893 visibleUnits[p].find(actorUnit) == visibleUnits[p].end())
1894 {
1895 continue;
1896 }
1897 ticksWithoutSeenAction[p] = 0;
1898 lastSeenActionLocation[p] = location;
1899 }
1900}
1901
1902int Battle::killStrandedUnits(GameState &state, StateRef<Organisation> org, bool preview)
1903{

Callers 5

growMethod · 0.80
setPositionMethod · 0.80
refreshUnitVisionMethod · 0.80
spendTUMethod · 0.80
updateMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected