WC2: persist color in corner case when using the workaround
This happens if player 4 and another one choose the same color. (They shouldn't do that to begin with, but they could) In this case the workaround is also triggered and side 4 gets a new color. That's fine. Previously that would have caused side 4's color to change in each scenario, thus it's now persisted as well. The workaround is for the case a player chooss choose the same coklor as side 4.
This commit is contained in:
parent
429be66b2e
commit
ee42883f14
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ function wesnoth.wml_actions.wc2_fix_colors(cfg)
|
|||
end
|
||||
side.color = available_colors[color_num]
|
||||
taken_colors[side.color] = true
|
||||
if side.side == 4 then
|
||||
side.variables.wc2_color = side.color
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue