dhewm3-sdk/game
Daniel Gibson 0bfc51f55e Fix renderlights loaded from savegames aliasing other lights
Some entities wrote the handle from gameRenderWorld->AddLightDef()
into savegames and reused it after restoring it.
That's a bad idea, because at that point the handle most likely belongs
to something else (likely some idLight). The most visible issue this
can create is that the flashlight may not work correctly after loading
a savegame with flashlight on, when it happens to alias a light that's
updated each frame to (mostly) being off..

The correct way to handle this (THAT FOR SOME REASON WAS ALREADY
IMPLEMENTED IN D3XP BUT NOT THE BASE GAME - WHY?!) is to get a fresh
handle with AddLightDef() when restoring a savegame - unless the handle
was -1, which means that the light didn't exist when saving.

fixes #495
2024-03-18 17:34:19 +01:00
..
ai import AROS changes 2018-08-20 01:46:39 +02:00
anim More logging cleanup 2018-08-20 01:46:36 +02:00
gamesys From dhewm3: Fix most (according to warnings) remaining 64bit issues in tool code 2022-05-17 07:17:46 +02:00
physics Improve some messages in game code 2022-05-17 07:17:46 +02:00
script Improve some messages in game code 2022-05-17 07:17:46 +02:00
Actor.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Actor.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
AF.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
AF.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
AFEntity.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
AFEntity.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
BrittleFracture.cpp Fix "unreachable code" warnings 2018-08-20 01:46:32 +02:00
BrittleFracture.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Camera.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Camera.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
EndLevel.cpp Make game dll names and compiler defines for mods configurable 2018-08-26 04:47:00 +02:00
EndLevel.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Entity.cpp StartSoundShader() event: special-case for soundName "", refs #494 2024-03-18 17:26:40 +01:00
Entity.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Fx.cpp s/ReadLong/ReadInt/ to match the return type 2018-08-20 01:46:33 +02:00
Fx.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Game_local.cpp Use idStr::Copynz() instead of strncpy() 2022-05-17 07:17:46 +02:00
Game_local.h Add information about dhewm3 build to savegames 2021-02-22 04:30:03 +01:00
Game_network.cpp Use idStr::Copynz() instead of strncpy() 2022-05-17 07:17:46 +02:00
GameBase.h Split Game_local.h 2018-08-20 01:46:27 +02:00
GameEdit.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
GameEdit.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
IK.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
IK.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Item.cpp Fix "unreachable code" warnings 2018-08-20 01:46:32 +02:00
Item.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Light.cpp s/ReadLong/ReadInt/ to match the return type 2018-08-20 01:46:33 +02:00
Light.h Fix -Woverloaded-virtual warnings 2018-08-20 01:46:29 +02:00
Misc.cpp Fix "unreachable code" warnings 2018-08-20 01:46:32 +02:00
Misc.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Moveable.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 17:34:19 +01:00
Moveable.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Mover.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Mover.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
MultiplayerGame.cpp s/ReadLong/ReadInt/ to match the return type 2018-08-20 01:46:33 +02:00
MultiplayerGame.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Player.cpp Fix lingering messages in HUD after loading savegame 2020-09-06 04:49:18 +02:00
Player.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
PlayerIcon.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
PlayerIcon.h Fix all whitespace errors 2018-08-20 01:46:22 +02:00
PlayerView.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
PlayerView.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Projectile.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 17:34:19 +01:00
Projectile.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Pvs.cpp Fix new[]/delete missmatches and memory leaks found by clang's ASAN 2018-08-20 01:46:39 +02:00
Pvs.h Rename PVS vars to match their type 2018-08-20 01:46:33 +02:00
SecurityCamera.cpp make base build with Visual Studio 14 2018-08-20 01:46:39 +02:00
SecurityCamera.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
SmokeParticles.cpp Fix some ubsan warnings 2024-03-18 17:33:10 +01:00
SmokeParticles.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Sound.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Sound.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Target.cpp Get rid of ID_DEMO_BUILD 2018-08-20 01:46:34 +02:00
Target.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Trigger.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Trigger.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Weapon.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 17:34:19 +01:00
Weapon.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
WorldSpawn.cpp Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
WorldSpawn.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00