diff --git a/StartWave/Classes/StartWave.uc b/StartWave/Classes/StartWave.uc index dbeb7f5..83d215d 100644 --- a/StartWave/Classes/StartWave.uc +++ b/StartWave/Classes/StartWave.uc @@ -258,7 +258,7 @@ private function SetWave(int NewWaveNum, PlayerController PC, optional bool bSki } //Kill all zeds currently alive. - PC.ConsoleCommand("KillZeds"); + KillZeds(); //Clear any current objectives. KFGRI.DeactivateObjective(); @@ -446,7 +446,7 @@ private function StartWaveTimer() { if (KFDemoRecSpectator(PC) == none) { - PC.ConsoleCommand("KillZeds"); + KillZeds(); break; } } @@ -508,6 +508,21 @@ private function UpdateTraderDurationTimer() } } +private function KillZeds() +{ + local KFPawn_Monster KFPM; + + foreach WorldInfo.AllPawns(class'KFPawn_Monster', KFPM) + { + if (!KFPM.IsAliveAndWell()) continue; + + if (KFPM.Health > 0 && PlayerController(KFPM.Controller) == None) + { + KFPM.Died(None, None, KFPM.Location); + } + } +} + defaultproperties { diff --git a/StartWave/Classes/StartWaveMut.uc b/StartWave/Classes/StartWaveMut.uc index 24710e6..420b5d2 100644 --- a/StartWave/Classes/StartWaveMut.uc +++ b/StartWave/Classes/StartWaveMut.uc @@ -32,7 +32,7 @@ public event PreBeginPlay() public function AddMutator(Mutator Mut) { - if (Mut == Self || bPendingDelete || bDeleteMe) return; + if (Mut == Self) return; if (Mut.Class == Class) StartWaveMut(Mut).SafeDestroy();