[Commits] [wesnoth/wesnoth] 045284: Check for occupied tunnel exits at teleport map cr...

GitHub noreply at github.com
Fri Sep 16 13:51:06 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 045284896615f20488ddb600a8c5b4c2da28e752
      https://github.com/wesnoth/wesnoth/commit/045284896615f20488ddb600a8c5b4c2da28e752
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2016-09-15 (Thu, 15 Sep 2016)

  Changed paths:
    M src/actions/move.cpp
    M src/pathfind/teleport.cpp

  Log Message:
  -----------
  Check for occupied tunnel exits at teleport map creation

Previously this was done in the move execution, which resulted in:
1. own and allied units on tunnel/teleport exits effectively acting as
ambushers and
2. unit reaches and shortest paths not being consistent with actually
possible moves.
Both issues occurred even without fog being active.

The former was unintuitive at best, while the latter could cause
serious problems, for example with AI code. By moving the check for
units on tunnel exits to the teleport map creation, both these issues
are taken care of simultaneously.

Only visible units are considered. In the presence of fog, enemy units
and units from allies without shared vision continue to interrupt the
move as expected.


  Commit: 692109f3bbcd0489d81f7f244c7bc244b703c669
      https://github.com/wesnoth/wesnoth/commit/692109f3bbcd0489d81f7f244c7bc244b703c669
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2016-09-15 (Thu, 15 Sep 2016)

  Changed paths:
    M src/pathfind/teleport.cpp
    M src/pathfind/teleport.hpp

  Log Message:
  -----------
  [tunnel] tag: add new optional parameter pass_allied_units=yes/no

If set to yes, units can now pass through own or allied units on the
tunnel exit. It defaults to no, which is the previous behavior.


  Commit: ff9450eff2975c02549f867c5fd8dc8dee000f0f
      https://github.com/wesnoth/wesnoth/commit/ff9450eff2975c02549f867c5fd8dc8dee000f0f
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2016-09-16 (Fri, 16 Sep 2016)

  Changed paths:
    M src/actions/move.cpp
    M src/pathfind/teleport.cpp
    M src/pathfind/teleport.hpp

  Log Message:
  -----------
  Merge pull request #782 from wesnoth/fix-tunnel-issues

Fix issues with tunnels when exit hex is occupied by an allied unit


Compare: https://github.com/wesnoth/wesnoth/compare/a477eb4014ba...ff9450eff297


More information about the Commits mailing list