dhewm3-sdk/game
Daniel Gibson 35840cfafb 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

# Conflicts:
#	game/Weapon.cpp
2024-03-18 23:47:04 +01:00
..
ai Fix or at least comment on some valid compiler warnings 2021-12-19 06:12:26 +01:00
anim Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
gamesys From dhewm3: Fix most (according to warnings) remaining 64bit issues in tool code 2022-05-29 00:47:00 +02:00
physics Improve some messages in game code 2022-05-29 00:47:00 +02:00
script Improve some messages in game code 2022-05-29 00:47:00 +02:00
Actor.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Actor.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
AF.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
AF.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
AFEntity.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
AFEntity.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
BrittleFracture.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
BrittleFracture.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +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 23:41:46 +01:00
Entity.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Fx.cpp Make Hardqore2 build 2018-08-26 23:55:54 +02:00
Fx.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Fx_old.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Fx_old.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Game_local.cpp Use idStr::Copynz() instead of strncpy() 2022-05-29 00:47:00 +02:00
Game_local.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Game_network.cpp Use idStr::Copynz() instead of strncpy() 2022-05-29 00:47:00 +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 Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Item.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +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
Liquid.cpp Make Hardqore2 build 2018-08-26 23:55:54 +02:00
Liquid.h Make Hardqore2 build 2018-08-26 23:55:54 +02:00
Misc.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Misc.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Moveable.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 23:47:04 +01:00
Moveable.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Mover.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Mover.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +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 or at least comment on some valid compiler warnings 2021-12-19 06:12:26 +01:00
Player.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01: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 Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
PlayerView.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Projectile.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 23:47:04 +01:00
Projectile.h Make Hardqore2 build 2018-08-26 23:55:54 +02:00
Pvs.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Pvs.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +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 23:41:46 +01:00
SmokeParticles.h Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
Sound.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Sound.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Target.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Target.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
tracer.cpp Make Hardqore2 build 2018-08-26 23:55:54 +02:00
tracer.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
TrailGenerator.cpp Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
TrailGenerator.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01:00
Trigger.cpp Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Trigger.h Import Hardqore2 (doesn't build yet) 2018-08-26 23:52:13 +02:00
Weapon.cpp Fix renderlights loaded from savegames aliasing other lights 2024-03-18 23:47:04 +01:00
Weapon.h Rename to hardcorps and integrate all its code changes 2021-12-19 05:55:54 +01: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