Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refresh team flags after using [modify_side] color= without a new fla…
…g set

Fixes bug #21867.
  • Loading branch information
irydacea committed May 16, 2014
1 parent 9f458d1 commit eb931a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog
Expand Up @@ -147,6 +147,8 @@ Version 1.13.0-dev:
that. For example --log-strict=warning causes both warnings and errors
to generate runtime exceptions. This is intended for unit tests.
* Fix bug #22042: filesystem content disclosure issue affecting Lua APIs
* Fix bug #21867: team flag colors not refreshed after making use of
[modify_side] color= unless a new flag set is also provided.

Version 1.11.11:
* Add-ons server:
Expand Down
7 changes: 6 additions & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -1316,10 +1316,15 @@ WML_HANDLER_FUNCTION(modify_side, /*event_info*/, cfg)
config::attribute_value flag = cfg["flag"];
if(!flag.empty()) {
teams[team_index].set_flag(flag);
resources::screen->reinit_flags_for_side(team_index);
// Needed especially when map isn't animated.
invalidate_screen = true;
}
// If either the flag set or the team color changed, we need to
// rebuild the team's flag cache to reflect the changes. Note that
// this is not required for flag icons (used by the theme UI only).
if(!color.empty() || !flag.empty()) {
resources::screen->reinit_flags_for_side(team_index);
}
// Change flag icon
config::attribute_value flag_icon = cfg["flag_icon"];
if(!flag_icon.empty()) {
Expand Down

0 comments on commit eb931a5

Please sign in to comment.