fix a bug, replace sighed -> sighted in move records
This commit is contained in:
parent
eb931a5ea3
commit
403af25e9d
4 changed files with 9 additions and 9 deletions
|
@ -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 ¤t_team = (*resources::teams)[
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
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,
|
||||
|
|
|
@ -276,7 +276,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue