by Player701 » Sat Jan 05, 2019 3:18 pm
When a save game is loaded, dynamic light actors have lights
reattached to them, but these lights are not reactivated. That's why the light disappears.
An obvious solution would be to check if the dynamic light actor has the DORMANT flag unset and activate the light in this case. However, this flag can be changed on the script side at any time, so it's not foolproof.
Edit: It seems that RecreateAllAttachedLights is called not only when the game is loaded, but also when it is saved. I'm not sure if I understand the need for this, so I won't provide a PR here. The cause of the problem is more or less evident, anyway.
When a save game is loaded, dynamic light actors have lights [url=https://github.com/coelckers/gzdoom/blob/6f6dc60e2b7f74a448b8884b75ea940615253734/src/g_shared/a_dynlight.cpp#L861]reattached[/url] to them, but these lights are not reactivated. That's why the light disappears.
An obvious solution would be to check if the dynamic light actor has the DORMANT flag unset and activate the light in this case. However, this flag can be changed on the script side at any time, so it's not foolproof.
[b]Edit:[/b] It seems that RecreateAllAttachedLights is called not only when the game is loaded, but also when it is saved. I'm not sure if I understand the need for this, so I won't provide a PR here. The cause of the problem is more or less evident, anyway.