Skip to content

Commit

Permalink
clear visibility data on stage transition
Browse files Browse the repository at this point in the history
  • Loading branch information
Warboy1982 committed Nov 20, 2018
1 parent 9bba3c3 commit ad06884
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Battlescape/BattlescapeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ void BattlescapeGenerator::nextStage()
// send all enemy units, or those not in endpoint area (if aborted) to time out
for (std::vector<BattleUnit*>::iterator i = _save->getUnits()->begin(); i != _save->getUnits()->end(); ++i)
{
(*i)->clearVisibleUnits();
(*i)->clearVisibleTiles();

if ((*i)->getStatus() != STATUS_DEAD // if they're not dead
&& (((*i)->getOriginalFaction() == FACTION_PLAYER // and they're a soldier
&& _save->isAborted() // and you aborted
Expand Down

0 comments on commit ad06884

Please sign in to comment.