From 22ad0617a8ef5bef360226322509dbb49f328e8a Mon Sep 17 00:00:00 2001 From: Gustavo Ramos Rehermann Date: Sat, 31 Aug 2024 17:15:18 -0300 Subject: [PATCH] Fix class array usage --- wadsrc/static/zscript/actors/shared/randomspawner.zs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wadsrc/static/zscript/actors/shared/randomspawner.zs b/wadsrc/static/zscript/actors/shared/randomspawner.zs index 5066820cdc0..6cd4c95c5cf 100644 --- a/wadsrc/static/zscript/actors/shared/randomspawner.zs +++ b/wadsrc/static/zscript/actors/shared/randomspawner.zs @@ -29,22 +29,22 @@ class RandomSpawnerTracker : Thinker { self.size--; } - void RegisterSpawn(Actor from, Actor dest) { + void RegisterSpawn(Actor from, Actor spawned) { let root = from.GetClass(); // find intermediary link to remove // (this prevents intermediary spawns from lingering without GC) for (int i = 0; i < size; i++) { - if (self.dest[i] == from) { + if (dest[i] == from) { root = self.origin[i]; self.Delete(i); break; } } - self.origin.Append(root); - self.dest.Append(dest); - self.destClass.append(dest); + origin.Push(root); + dest.Push(spawned); + destClass.Push(spawned.GetClass()); size++; }