Garry's Mod

Garry's Mod

Gmod Light / Environment Editor
Saves with the editor in them will crash the game
Some of my saves with the environment editor in them (and lighting values set to 2-3) will cause the game to immediately crash upon loading. I also have a fog editor loaded as well if that has any effect on the environment editor. Disabling the environment editor addon will allow the same saves to be loaded just fine (with obviously no changes to the environment or lighting).

I am running the 64-bit + chromium branch, 32GB RAM, Radeon RX 6650XT, Ryzen 7 5700x.
< >
Showing 1-4 of 4 comments
JonahSoldier  [developer] May 13, 2024 @ 12:09am 
A bunch of the options cause lag spikes when changed (e.g. Ambient Light, Radiosity, mat_specular). They're more severe on larger maps, so if it's just larger maps it might be because too much is being loaded in/changed at once. If it's every map (including ones like gm_construct) then I'm not really sure what would cause this. Either way I don't think I can really do anything to help other than suggesting you try using smaller maps, fewer changed values, or fewer entities.

Everything that causes any lag in this addon is a result of changing an existing console command or calling an existing function, which I don't have any way to optimize.

(Also the fog editor shouldn't have any effect on the light/environment editor, there isn't any overlap in what they do/what functions they use. If it did I'd be very surprised)
I agree that it might just be due to too much being loaded in at once. Could it be possible that a slight delay is added? Maybe a way to wait for the game to load and then apply the lighting changes?
I swear, I tried to change the lighting on a map i'm working on for posing, only to crashes me out, i guess you're not the only one, unless it's some of addons i've subscribed to must've conflicted with.
JonahSoldier  [developer] Apr 3 @ 11:28am 
Originally posted by fail rp, next time is a kick:
I agree that it might just be due to too much being loaded in at once. Could it be possible that a slight delay is added? Maybe a way to wait for the game to load and then apply the lighting changes?
Sorry for the (almost year-long) delay. I think I missed the notification for this one back then.

There actually already is a delay of varying sizes for most of these. Ambient light has a 0.5s delay to any update (because otherwise dragging the slider would severely lag or crash you), and mat_specular/r_radiosity have 3 second delays.

Sorry if that isn't very helpful. I just can't really do much, because everything that's weird / semi-broken / laggy in this addon is happening in-engine, rather than in the part I wrote (which is actually pretty simple, it's only a couple hundred lines, most of which is defining convars and setting values)
< >
Showing 1-4 of 4 comments
Per page: 1530 50