Merge pull request #4 from GenZmeY/mut-update

upd mut
This commit is contained in:
GenZmeY 2023-07-04 22:21:00 +03:00 committed by GitHub
commit 0c17002509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,11 @@ class ZedSpawnerMut extends KFMutator
var private ZedSpawner ZS;
public simulated function bool SafeDestroy()
{
return (bPendingDelete || bDeleteMe || Destroy());
}
public event PreBeginPlay()
{
Super.PreBeginPlay();
@ -22,7 +27,7 @@ public event PreBeginPlay()
if (ZS == None)
{
`Log_Base("FATAL: Can't Spawn 'ZedSpawner'");
Destroy();
SafeDestroy();
}
}
@ -31,7 +36,7 @@ public function AddMutator(Mutator Mut)
if (Mut == Self) return;
if (Mut.Class == Class)
Mut.Destroy();
ZedSpawnerMut(Mut).SafeDestroy();
else
Super.AddMutator(Mut);
}