Skip to content

Commit

Permalink
more robust replaying of moves
Browse files Browse the repository at this point in the history
we now set skipsighted to true if there is no fog or shroud.
The intention is that if a player uses fog=no in debugmode we still get
the same move destination in replays.
  • Loading branch information
gfgtdf committed May 2, 2014
1 parent 59d2bcd commit 1865684
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/actions/move.cpp
Expand Up @@ -1242,7 +1242,13 @@ size_t move_unit_and_record(const std::vector<map_location> &steps,
( steps.empty() ? map_location::null_location : steps.front() ) << ".\n";
return 0;
}

//if we have no fog activatd we always skipsighed
if(resources::units->find(steps.front()) != resources::units->end())
{
const team &current_team = (*resources::teams)[
resources::units->find(steps.front())->side() - 1];
continued_move |= !current_team.fog_or_shroud();
}
const bool skip_ally_sighted = !preferences::interrupt_when_ally_sighted();

// Evaluate this move.
Expand Down

0 comments on commit 1865684

Please sign in to comment.