Config.maxLights not honored?

Started by Zlatirbarfast, June 11, 2015, 12:57:54 PM

Previous topic - Next topic

Zlatirbarfast

Hello!
I have a situation where I use many light sources, but at any given time only a few of them are lit. Hence I have passed the default maxLights setting (32). But even though I've trided both e.g. Config.maxLights = 128 and Config.setParameterValue("maxLights", 64) as first statements in  thread entry point, i still get the
"WARNING: Tried to modify an undefined light source!" for all light id's > 32 and the light source does not appear. Why is this?
I could of curse work around this by moving some lights to where they are currently needed, but I feel it would be waste of time since I cannot see any reason as to why changing the settings does not take effect. If i read the value of the setting at runtime, it shows the value I set i to...

EgonOlsen

Make sure that you change this setting before calling new World()...

Zlatirbarfast

Ok, thanks, I thought it was as something simple as that. Is there any declaration of wish config values that must be set prior to World initialization? Or perhaps in general all changes to Config should be set prior to World initialization?

EgonOlsen

If it's needed, it should be mentioned in the docs. Just like with maxLights, where it states:
QuoteHas to be modified before constructing the World to take effect.