Allow light entities to specify a named light property.

This commit is contained in:
Bill Currie 2010-10-16 12:42:27 +09:00
parent 73a280f86a
commit 70d42cc838

View file

@ -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");