diff --git a/changelog b/changelog index cc1699c8158..8f885bbba68 100644 --- a/changelog +++ b/changelog @@ -118,6 +118,7 @@ Version 1.11.6+dev: * Allow numerical values for SideWML "controller" attribute. * Allow WML menu items to use hotkeys alongside/instead of the menu. * Really added sighted events for ambushing units. + * [scroll] now takes an optional side filter. * Units: * Gave the Death Knight proper skeletal resistances, as well as submerge. * User interface: diff --git a/src/game_events/action_wml.cpp b/src/game_events/action_wml.cpp index 7f5727704b9..86be8e2df3c 100644 --- a/src/game_events/action_wml.cpp +++ b/src/game_events/action_wml.cpp @@ -1815,9 +1815,13 @@ WML_HANDLER_FUNCTION(role, /*event_info*/, cfg) WML_HANDLER_FUNCTION(scroll, /*event_info*/, cfg) { - game_display &screen = *resources::screen; - screen.scroll(cfg["x"], cfg["y"], true); - screen.draw(true,true); + const std::vector side_list = get_sides_vector(cfg); + if ((cfg["side"].empty() && !cfg.has_child("filter_side")) || + std::find(side_list.begin(), side_list.end(), resources::controller->current_side()) != side_list.end()) { + game_display &screen = *resources::screen; + screen.scroll(cfg["x"], cfg["y"], true); + screen.draw(true,true); + } } /// Experimental data persistence