[world conquest] [master] [lua] Check for wc2_scenario value before executing wc2_start_units function (#6052)
What this does is just checks the value of wc2_scenario before executing the function, and executes it for the first scenario only as intended.
This commit is contained in:
parent
47bff304fc
commit
19b38fe249
1 changed files with 6 additions and 4 deletions
|
@ -65,10 +65,12 @@ end)
|
|||
-- we need to do this also after difficulty selection.
|
||||
-- NOTE: this is a bit fragile, in particualr it breaks if difficulty_selection happens before the prestart event above.
|
||||
on_event("wc2_start", function(cx)
|
||||
for side_num = 1, wml.variables.wc2_player_count do
|
||||
wesnoth.wml_actions.wc2_start_units {
|
||||
side = side_num
|
||||
}
|
||||
if wml.variables.wc2_scenario == 1 then
|
||||
for side_num = 1, wml.variables.wc2_player_count do
|
||||
wesnoth.wml_actions.wc2_start_units {
|
||||
side = side_num
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if wml.variables.wc2_difficulty.extra_training then
|
||||
|
|
Loading…
Add table
Reference in a new issue