From 70d42cc83895e65da3a0c85c38d235e109f584ce Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 16 Oct 2010 12:42:27 +0900 Subject: [PATCH] Allow light entities to specify a named light property. --- tools/qflight/source/properties.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/qflight/source/properties.c b/tools/qflight/source/properties.c index 2b76469a9..0851613e9 100644 --- a/tools/qflight/source/properties.c +++ b/tools/qflight/source/properties.c @@ -175,6 +175,13 @@ set_properties (entity_t *ent, plitem_t *dict) const char *str; if (properties) { + prop = PL_ObjectForKey (properties, ent->classname); + if ((p = get_item ("_light_name", dict, 0)) + && (str = PL_String (p))) + prop = PL_ObjectForKey (properties, str); + if (!prop) + prop = PL_ObjectForKey (properties, ent->classname); + prop = PL_ObjectForKey (properties, ent->classname); if (!prop) prop = PL_ObjectForKey (properties, "default");