[wesnoth-commits] [wesnoth/wesnoth] 978229: Only show planned moves to self and allies
Steve Cotton
noreply at github.com
Thu Jan 13 09:46:56 UTC 2022
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 978229c24732f45975d80e158b7dbc0233b80e69
https://github.com/wesnoth/wesnoth/commit/978229c24732f45975d80e158b7dbc0233b80e69
Author: Steve Cotton <steve at octalot.co.uk>
Date: 2022-01-13 (Thu, 13 Jan 2022)
Changed paths:
M src/mouse_events.cpp
M src/mouse_events.hpp
Log Message:
-----------
Only show planned moves to self and allies
Fixes #6292, that the planned final destination from multi-turn moves and
interrupted moves was visible to enemies. There are three side-numbers involved
in this logic, listed below; the GUI code was checking whether the move should
be visible to the player whose turn it is, rather to the viewing team.
* un->side(), the owner of the unit
* mouse_handler::side_num_, the side whose turn it is
* viewing_team(), the side of the player whose computer this wesnoth-client is
running on, thus which side's shroud and fog should be applied.
The plans are still hidden for units belonging to local AI sides, to hide any
goto_x,goto_y settings by campaign authors. The edge case in multiplayer of
allied network AI sides isn't tested here, but I think it's a trivial matter
whether or not those plans are shown.
(cherry picked from commit af0968d9c35325ce3b4bdbdb18c6112ea9ed137b)
Commit: e26a15cec2600ddf721fe312a5e6e0370b5ebb83
https://github.com/wesnoth/wesnoth/commit/e26a15cec2600ddf721fe312a5e6e0370b5ebb83
Author: Steve Cotton <steve at octalot.co.uk>
Date: 2022-01-13 (Thu, 13 Jan 2022)
Changed paths:
M src/menu_events.cpp
Log Message:
-----------
Don't leave a hex selected when using 't' to continue a move
Fixes the minor part of issue #6292, that functionality showing the path
to a selected hex was active after continuing an interrupted move. That
feature is completely separate to the main bug of #6292, but it looks
confusingly similar in testing. The intended way to activate this feature is
via the "Select Hex" hotkey, which doesn't have any keybinding by default, so
should only be reachable by people who want the feature.
It would be good to refactor the movement handling so that it's not split
between mouse-handling and menu-handling files, but it would also need a lot of
work and would be out-of-scope for backporting to 1.16.
(cherry picked from commit 8351fec2aeb36a3a408bfd7fb89e7aa5d31723ba)
Compare: https://github.com/wesnoth/wesnoth/compare/0679eeba30c6...e26a15cec260
More information about the Commits
mailing list