RedownloadAllLightmaps causes crashed
Freilichtbuehne opened this issue · 3 comments
Whenever time changes and the lightmaps are getting redownloaded, 80% of all players crash.
In their crashlog always appears the same error:
-Lua Stack Traces-
Client
0. RedownloadAllLightmaps - [C]:-1
1. (null) - addons/stormfox2/lua/stormfox2/framework/sh_maplight.lua:124
Server
Lua Interface = NULL
MenuSystem
*Not in Lua call OR Lua has panicked*
I tried to reproduce the crash on an empty server but didn't achieve it.
Sadly there isn't much I can do regarding the render.RedownloadAllLightmaps.
It is a troublesome function as it forces the client to update all light-surfaces on the map at the same time.
I've requested an alternative way to update the light, but until then, you would have to choose maps with light_enviroment and disable extra light.
Whenever time changes and the lightmaps are getting redownloaded, 80% of all players crash.
In their crashlog always appears the same error:-Lua Stack Traces- Client 0. RedownloadAllLightmaps - [C]:-1 1. (null) - addons/stormfox2/lua/stormfox2/framework/sh_maplight.lua:124 Server Lua Interface = NULL MenuSystem *Not in Lua call OR Lua has panicked*
I tried to reproduce the crash on an empty server but didn't achieve it.
Try using only a one 'true' argument in render.RedownloadAllLightmaps.
render.RedownloadAllLightmaps(true)
That helped me.
Version 2.22 and above should allow you to use other light-styles and even mix a few.
It wouldn't solve LightStyle being laggy, but it will give you new alternatives that doesn't lag as much.
render.RedownloadAllLightmaps does require being called with two trues, or static-props won't update correctly.
This is sadly unsolvable, until we get a new LightStyle function for Gmod.