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

GitHub noreply at github.com
Thu Sep 15 20:58:22 UTC 2016


  Branch: refs/heads/fix-tunnel-issues
  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.


Compare: https://github.com/wesnoth/wesnoth/compare/045284896615^...692109f3bbcd


More information about the Commits mailing list