[Duplicate] gf10ded756 dynamic light disappears when you load a save

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

gf10ded756 dynamic light disappears when you load a save

Postby Nash » Fri Jan 04, 2019 10:28 am

Same mod as before. Turn on the flashlight, save the game, then load the game. The spotlight would disappear.

https://www.dropbox.com/s/vbwsji4l6e85m ... 0.pk7?dl=1
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: gf10ded756 dynamic light disappears when you load a save

Postby Player701 » Sat Jan 05, 2019 4: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.
User avatar
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214

Re: gf10ded756 dynamic light disappears when you load a save

Postby Graf Zahl » Wed Jan 30, 2019 6:25 pm

same as the other one.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: gf10ded756 dynamic light disappears when you load a save

Postby Player701 » Thu Jan 31, 2019 12:51 am

This fix (as of g3.8pre-180-ga2065cae4) creates the following problem with the example WAD (steve_flashlight_2018.02.10.pk7 from the OP): after toggling the flashlight once, saving the game will create another copy of the light in the same place where the light actor was last positioned. Saving the game repeatedly seems to create more and more lights, ad infinitum. Turning the flashlight on again will make all these lights move together as one. Loading the saved game will make all lights but one go away; one light always remains regardless of whether the flashlight was turned on or off when the game was saved.
User avatar
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214

Re: gf10ded756 dynamic light disappears when you load a save

Postby Graf Zahl » Thu Jan 31, 2019 1:18 am

please report this as a new bug!
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: gf10ded756 dynamic light disappears when you load a save

Postby Player701 » Thu Jan 31, 2019 1:29 am

User avatar
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests