light: Make sure we can't start a light dark when it has no targetname.

This is to work around a bug present in a custom map that was suggested
that had an untriggerable light with no style - thus turning all lights off
This commit is contained in:
Marco Cawthorne 2020-11-27 17:52:51 +01:00
parent 3187bc0ffa
commit 2cef5d76ec

View file

@ -93,7 +93,7 @@ light::Trigger(entity act, int state)
void void
light::Respawn(void) light::Respawn(void)
{ {
if (spawnflags & 1) { if (spawnflags & 1 && targetname) {
lightstyle(m_flStyle, "a"); lightstyle(m_flStyle, "a");
m_iEnabled = 0; m_iEnabled = 0;
} else { } else {