mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 08:13:18 +00:00
In clear_shroud_loc(...), don't check team.fogged(x,y) before clearing the fog.
The clear functions check this, and fogged will operate differently depending on whether or not shared vision is enabled. This is the fix for bug #8888: shared vision failing to update properly when an allied unit dies.
This commit is contained in:
parent
8f950f90b2
commit
2575e62880
@ -1342,16 +1342,14 @@ bool clear_shroud_loc(const gamemap& map, team& tm,
|
||||
adj[6] = loc;
|
||||
for(int i = 0; i != 7; ++i) {
|
||||
if(map.on_board(adj[i])) {
|
||||
if(tm.fogged(adj[i].x,adj[i].y)) {
|
||||
const bool res = tm.clear_shroud(adj[i].x,adj[i].y) ||
|
||||
tm.clear_fog(adj[i].x,adj[i].y);
|
||||
const bool res = tm.clear_shroud(adj[i].x,adj[i].y) ||
|
||||
tm.clear_fog(adj[i].x,adj[i].y);
|
||||
|
||||
if(res && cleared != NULL) {
|
||||
cleared->push_back(adj[i]);
|
||||
}
|
||||
|
||||
result |= res;
|
||||
if(res && cleared != NULL) {
|
||||
cleared->push_back(adj[i]);
|
||||
}
|
||||
|
||||
result |= res;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user