From 6f43585c0fb4215b753bee3790b70a8eb6790b0c Mon Sep 17 00:00:00 2001 From: cypress Date: Sat, 29 Jun 2024 10:08:03 -0700 Subject: [PATCH] SERVER: Auto-remove targetless lights and info_null --- source/server/dummies.qc | 1 + source/server/entities/lights.qc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/server/dummies.qc b/source/server/dummies.qc index 8275c89..25b345f 100644 --- a/source/server/dummies.qc +++ b/source/server/dummies.qc @@ -46,6 +46,7 @@ void() info_player_1_spawn = {}; void() info_player_2_spawn = {}; void() info_player_3_spawn = {}; void() info_player_4_spawn = {}; +void() info_null = {remove(self);}; void() zombie_horde_point = {}; diff --git a/source/server/entities/lights.qc b/source/server/entities/lights.qc index 3b583c7..5b053cb 100644 --- a/source/server/entities/lights.qc +++ b/source/server/entities/lights.qc @@ -61,8 +61,10 @@ void() LS_Setup = void() L_Setup = { // If it's not vanilla ZHLT, cut it off. - if (self.style > 12) - return; + if (self.style > 12 || !self.targetname) { + remove(self); + return; + } // Set the Light to be Off if the spawnflag is set. /*if ((self.spawnflags & LIGHT_SPAWNFLAG_STARTOFF)) {