gf10ded756 dynamic light disappears when you load a save

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: gf10ded756 dynamic light disappears when you load a save

Re: gf10ded756 dynamic light disappears when you load a save

by Player701 » Thu Jan 31, 2019 12:29 am

Re: gf10ded756 dynamic light disappears when you load a save

by Graf Zahl » Thu Jan 31, 2019 12:18 am

please report this as a new bug!

Re: gf10ded756 dynamic light disappears when you load a save

by Player701 » Wed Jan 30, 2019 11:51 pm

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.

Re: gf10ded756 dynamic light disappears when you load a save

by Graf Zahl » Wed Jan 30, 2019 5:25 pm

same as the other one.

Re: gf10ded756 dynamic light disappears when you load a save

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.

gf10ded756 dynamic light disappears when you load a save

by Nash » Fri Jan 04, 2019 9: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

Top