Author Topic: Config.maxLights not honored?  (Read 2465 times)

Offline Zlatirbarfast

  • byte
  • *
  • Posts: 2
    • View Profile
Config.maxLights not honored?
« on: June 11, 2015, 12:57:54 pm »
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...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Config.maxLights not honored?
« Reply #1 on: June 11, 2015, 01:49:51 pm »
Make sure that you change this setting before calling new World()...

Offline Zlatirbarfast

  • byte
  • *
  • Posts: 2
    • View Profile
Re: Config.maxLights not honored?
« Reply #2 on: June 17, 2015, 09:33:46 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Config.maxLights not honored?
« Reply #3 on: June 17, 2015, 10:38:44 pm »
If it's needed, it should be mentioned in the docs. Just like with maxLights, where it states:
Quote
Has to be modified before constructing the World to take effect.