SERVER: Auto-remove targetless lights and info_null

This commit is contained in:
cypress 2024-06-29 10:08:03 -07:00
parent 9fc6f93e77
commit 6f43585c0f
2 changed files with 5 additions and 2 deletions

View file

@ -46,6 +46,7 @@ void() info_player_1_spawn = {};
void() info_player_2_spawn = {}; void() info_player_2_spawn = {};
void() info_player_3_spawn = {}; void() info_player_3_spawn = {};
void() info_player_4_spawn = {}; void() info_player_4_spawn = {};
void() info_null = {remove(self);};
void() zombie_horde_point = {}; void() zombie_horde_point = {};

View file

@ -61,8 +61,10 @@ void() LS_Setup =
void() L_Setup = void() L_Setup =
{ {
// If it's not vanilla ZHLT, cut it off. // If it's not vanilla ZHLT, cut it off.
if (self.style > 12) if (self.style > 12 || !self.targetname) {
return; remove(self);
return;
}
// Set the Light to be Off if the spawnflag is set. // Set the Light to be Off if the spawnflag is set.
/*if ((self.spawnflags & LIGHT_SPAWNFLAG_STARTOFF)) { /*if ((self.spawnflags & LIGHT_SPAWNFLAG_STARTOFF)) {