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:
John B. Messerly 2004-05-12 04:08:38 +00:00
parent 8f950f90b2
commit 2575e62880

View file

@ -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;
}
}