beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
178 stars 95 forks source link

Enabling the decals drawer should not require restarting the engine #1552

Open springraaar opened 2 weeks ago

springraaar commented 2 weeks ago

Happens on all engine builds including the latest 105.1.1-2511-g747f18b BAR105

If the engine loaded the decals drawer when the battle starts (GroundDecals > 0), it can be enabled or disabled ingame through lua or the /grounddecals X command, but it decals were initially disabled (GroundDecals = 0), enabling it doesn't actually start it and we get a warning on the console:


[t=00:00:42.039098][f=0000879] Loaded DecalsDrawer: null
[t=00:00:42.039118][f=0000879] Ground-decal rendering is disabled!

This prevents games or maps that have particularly relevant decals like metal spots from using them reliably.

Simple fix might be to just always load the decals drawer and disable it if GroundDecals = 0.