Skip to content

Commit

Permalink
fix a bug, replace sighed -> sighted in move records
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed May 16, 2014
1 parent 68b5fc1 commit bd4dd05
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/actions/move.cpp
Expand Up @@ -1242,7 +1242,7 @@ 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 we have no fog activated then we always skip sighted
if(resources::units->find(steps.front()) != resources::units->end())
{
const team &current_team = (*resources::teams)[
Expand Down
12 changes: 6 additions & 6 deletions src/replay_helper.cpp
Expand Up @@ -58,19 +58,19 @@ config replay_helper::get_disband(const std::string& unit_id)
* This should be the steps to be taken this turn, ending in an
* apparently-unoccupied (from the moving team's perspective) hex.
*/
config replay_helper::get_movement(const std::vector<map_location>& steps, bool skip_sighed, bool skip_ally_sighted)
config replay_helper::get_movement(const std::vector<map_location>& steps, bool skip_sighted, bool skip_ally_sighted)
{
assert(!steps.empty());

config move;
if(skip_sighed)
if(skip_sighted)
{
//note, that skip_ally_sighted has no effect if skip_sighed is true
move["skip_sighed"] = "all";
//note, that skip_ally_sighted has no effect if skip_sighted is true
move["skip_sighted"] = "all";
}
else if(skip_ally_sighted && !skip_sighed)
else if(skip_ally_sighted && !skip_sighted)
{
move["skip_sighed"] = "only_ally";
move["skip_sighted"] = "only_ally";
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/replay_helper.hpp
Expand Up @@ -28,7 +28,7 @@ class replay_helper

static config get_disband(const std::string& unit_id);
//TODO: add some additional checkup (unit checksum) here.
static config get_movement(const std::vector<map_location>& steps, bool skipsighed, bool skip_ally_sighted);
static config get_movement(const std::vector<map_location>& steps, bool skip_sighted, bool skip_ally_sighted);

static config get_attack(const map_location& a, const map_location& b,
int att_weapon, int def_weapon, const std::string& attacker_type_id,
Expand Down
2 changes: 1 addition & 1 deletion src/synced_commands.cpp
Expand Up @@ -270,7 +270,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(move, child, use_undo, show, error_handler)
}
bool skip_sighted = false;
bool skip_ally_sighted = false;
if(child["skip_sighed"] == "all")
if(child["skip_sighted"] == "all")
{
skip_sighted = true;
}
Expand Down

0 comments on commit bd4dd05

Please sign in to comment.