mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 02:47:53 +00:00
Update error in a loop.
cleared_something was supposed to be the "or" of each return value, not the last return value.
This commit is contained in:
parent
bd31d0cdbb
commit
6268b32c4d
@ -403,8 +403,9 @@ bool shroud_clearer::clear_dest(const map_location &dest, const unit &viewer)
|
||||
map_location adjacent[6];
|
||||
get_adjacent_tiles(dest, adjacent);
|
||||
for ( int i = 0; i != 6; ++i )
|
||||
cleared_something = clear_loc(viewing_team, adjacent[i], viewer, dest,
|
||||
true, enemies, friends);
|
||||
if ( clear_loc(viewing_team, adjacent[i], viewer, dest,
|
||||
true, enemies, friends) )
|
||||
cleared_something = true;
|
||||
|
||||
if ( cleared_something )
|
||||
invalidate_after_clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user