diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index d15f48a827..69ae7d7b6f 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -1433,15 +1433,15 @@ public class LExecutor{ public void run(LExecutor exec){ switch(rule){ case waveTimer -> state.rules.waveTimer = exec.bool(value); - case wave -> state.wave = exec.numi(value); - case currentWaveTime -> state.wavetime = exec.numf(value) * 60f; + case wave -> state.wave = Math.max(exec.numi(value), 1); + case currentWaveTime -> state.wavetime = Math.max(exec.numf(value) * 60f, 0f); case waves -> state.rules.waves = exec.bool(value); case waveSending -> state.rules.waveSending = exec.bool(value); case attackMode -> state.rules.attackMode = exec.bool(value); case waveSpacing -> state.rules.waveSpacing = exec.numf(value) * 60f; case enemyCoreBuildRadius -> state.rules.enemyCoreBuildRadius = exec.numf(value) * 8f; case dropZoneRadius -> state.rules.dropZoneRadius = exec.numf(value) * 8f; - case unitCap -> state.rules.unitCap = exec.numi(value); + case unitCap -> state.rules.unitCap = Math.max(exec.numi(value), 0); case lighting -> state.rules.lighting = exec.bool(value); case mapArea -> { int x = exec.numi(p1), y = exec.numi(p2), w = exec.numi(p3), h = exec.numi(p4); @@ -1450,7 +1450,7 @@ public class LExecutor{ } } case ambientLight -> state.rules.ambientLight.fromDouble(exec.num(value)); - case solarMultiplier -> state.rules.solarMultiplier = exec.numf(value); + case solarMultiplier -> state.rules.solarMultiplier = Math.max(exec.numf(value), 0f); case unitHealth, unitBuildSpeed, unitCost, unitDamage, blockHealth, blockDamage, buildSpeed, rtsMinSquad, rtsMinWeight -> { Team team = exec.team(p1); if(team != null){