Replays: Show visible units in "Damage versus" sidebar tooltip

Part of #4134
This commit is contained in:
josteph 2019-10-10 02:32:26 +00:00
parent 980fad6bf8
commit 2c2d1f8b2f
2 changed files with 4 additions and 2 deletions

View file

@ -44,6 +44,7 @@
are grayed out. (PR#4362, part of Issue#1282)
* Hide the "Suppose Dead" key from the hotkeys list (it does nothing since 1.9.12)
* Status table: In replays with "View: Full Map", show all sides' gold status (Issue#4410)
* Sidebar: In replays with "View: Full Map", show all enemy units in "Damage versus:" tooltip
### Lua API
* Accessing wesnoth.theme_items.unit_status no longer prevents the unit
status (poisoned/slowed/etc) from being shown in the sidebar. (Issue#4079)

View file

@ -27,6 +27,7 @@
#include "pathfind/pathfind.hpp"
#include "picture.hpp"
#include "reports.hpp"
#include "resources.hpp"
#include "color.hpp"
#include "team.hpp"
#include "terrain/movement.hpp"
@ -884,8 +885,8 @@ static int attack_info(reports::context & rc, const attack_type &at, config &res
if (!unit_team.is_enemy(enemy.side()))
continue;
const map_location &loc = enemy.get_location();
if (viewing_team.fogged(loc) ||
(viewing_team.is_enemy(enemy.side()) && enemy.invisible(loc)))
const bool see_all = game_config::debug || rc.screen().show_everything();
if (!enemy.is_visible_to_team(viewing_team, see_all))
continue;
bool new_type = seen_types.insert(enemy.type_id()).second;
if (new_type) {