diff --git a/spawner/spawner.gd b/spawner/spawner.gd index 672d27b..f188599 100644 --- a/spawner/spawner.gd +++ b/spawner/spawner.gd @@ -11,7 +11,9 @@ var buffer: int = 0 func spawn(): - buffer = clampi(buffer + 1, 0, buffer_cap) + buffer += 1 + if buffer > buffer_cap: + buffer = buffer_cap func _physics_process(_delta):