Applied patch #1058.
This commit is contained in:
parent
d42e83a20e
commit
4b008e5c35
3 changed files with 15 additions and 2 deletions
|
@ -98,6 +98,8 @@ Version 1.5.0-svn:
|
|||
* Add support for overlay terrains (terrains which can be placed above any
|
||||
base terrain)
|
||||
* Add multiple types for events
|
||||
* Add allow a simple [clear_variable] to clear multiple variables (separated
|
||||
by comma)
|
||||
* miscellaneous and bug fixes:
|
||||
* Changed logging to have less overhead when it is turned off (patch #1038)
|
||||
* Fixed error message for broken add-on campaigns (bug #11078)
|
||||
|
|
|
@ -741,7 +741,11 @@
|
|||
[/entry]
|
||||
[entry]
|
||||
name = "Petr Sobotka (Pietro)"
|
||||
[/entry]
|
||||
[/entry]
|
||||
[entry]
|
||||
name = "Prevost Thomas (zancdar)"
|
||||
email = "thomas.prevost_AT_gmail.com"
|
||||
[/entry]
|
||||
[entry]
|
||||
name = "Priit Laes (plaes)"
|
||||
[/entry]
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "gettext.hpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
#include "foreach.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
@ -1951,6 +1952,7 @@ void event_handler::handle_event_command(const queued_event& event_info,
|
|||
utils::split(side_for_raw, ',', utils::STRIP_SPACES | utils::REMOVE_EMPTY);
|
||||
std::vector<std::string>::iterator itSide;
|
||||
size_t side;
|
||||
|
||||
// Check if any of side numbers are human controlled
|
||||
for (itSide = side_for.begin(); itSide != side_for.end(); ++itSide)
|
||||
{
|
||||
|
@ -2613,7 +2615,11 @@ void event_handler::handle_event_command(const queued_event& event_info,
|
|||
// Command to remove a variable
|
||||
else if(cmd == "clear_variable") {
|
||||
const std::string name = cfg["name"];
|
||||
state_of_game->clear_variable(name);
|
||||
std::vector<std::string> vars_to_clear =
|
||||
utils::split(name, ',', utils::STRIP_SPACES | utils::REMOVE_EMPTY);
|
||||
foreach(const std::string& var, vars_to_clear) {
|
||||
state_of_game->clear_variable(var);
|
||||
}
|
||||
}
|
||||
|
||||
else if(cmd == "endlevel") {
|
||||
|
@ -3203,3 +3209,4 @@ bool entity_location::requires_unit() const
|
|||
|
||||
} // end namespace game_events (2)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue