mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 21:17:55 +00:00
Roughly cap the number of undead spawns to avoid performance issues
This commit is contained in:
parent
25c31ed720
commit
402627d851
@ -1040,6 +1040,13 @@ _f, _f, Re, _f
|
|||||||
greater_than=$first_undead_spawn_turn
|
greater_than=$first_undead_spawn_turn
|
||||||
[/variable]
|
[/variable]
|
||||||
|
|
||||||
|
# Don't spawn more than is really needed, for performance reasons
|
||||||
|
[have_unit]
|
||||||
|
side=2
|
||||||
|
race=bats,undead
|
||||||
|
count=0-50
|
||||||
|
[/have_unit]
|
||||||
|
|
||||||
[then]
|
[then]
|
||||||
{VARIABLE max_undead_spawns $turn_number}
|
{VARIABLE max_undead_spawns $turn_number}
|
||||||
{VARIABLE_OP max_undead_spawns sub 2}
|
{VARIABLE_OP max_undead_spawns sub 2}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user