SV_PerformLoad: Saner check for if we can call Destroy()...

This commit is contained in:
Marco Cawthorne 2024-03-04 19:55:30 -08:00
parent 32a36d8017
commit 0c2db7a23a
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 4 additions and 4 deletions

View File

@ -705,8 +705,8 @@ SV_PerformLoad(float fh, float entcount, float playerslots)
#ifdef REEDICT
while ((e=nextent(e))) {
if (edict_num(1) != e)
NSEntity toRemove = (NSEntity)e;
if (toRemove.Destroy) {
if (e.identity) {
NSEntity toRemove = (NSEntity)e;
toRemove.Destroy();
} else {
remove(e);
@ -753,9 +753,9 @@ SV_PerformLoad(float fh, float entcount, float playerslots)
loadent = (NSEntity)e;
self = eold;
} else {
NSEntity toRemove = (NSEntity)e;
NSError("Could not spawn %s", cname);
if (toRemove.Destroy) {
if (e.identity) {
NSEntity toRemove = (NSEntity)e;
toRemove.Destroy();
} else {
remove(e);