From 12fa487cb5ced2b478a2ff43c484b4f1433f9a81 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 24 Apr 2023 17:57:11 +0200 Subject: [PATCH] Fix build --- Source/diablo.cpp | 4 ++-- Source/loadsave.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 04909a0b5..f30df8bfe 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -2936,8 +2936,8 @@ void LoadGameLevel(bool firstflag, lvl_entry lvldir) UpdateMonsterLights(); UnstuckChargers(); if (leveltype != DTYPE_TOWN) { - memcpy(dLight, dPreLight, sizeof(dLight)); // resets the light on entering a level to get rid of incorrect light - ChangeLightXY(Players[MyPlayerId]._plid, Players[MyPlayerId].position.tile); // forces player light refresh + memcpy(dLight, dPreLight, sizeof(dLight)); // resets the light on entering a level to get rid of incorrect light + ChangeLightXY(Players[MyPlayerId].lightId, Players[MyPlayerId].position.tile); // forces player light refresh ProcessLightList(); ProcessVisionList(); } diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index 5b28b9adb..538032de7 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -2647,9 +2647,9 @@ void LoadLevel() AutomapView[i][j] = automapView == MAP_EXP_OLD ? MAP_EXP_SELF : automapView; } } - //no need to load dLight, we can recreate it accurately from LightList - memcpy(dLight, dPreLight, sizeof(dLight)); // resets the light on entering a level to get rid of incorrect light - ChangeLightXY(Players[MyPlayerId]._plid, Players[MyPlayerId].position.tile); // forces player light refresh + // no need to load dLight, we can recreate it accurately from LightList + memcpy(dLight, dPreLight, sizeof(dLight)); // resets the light on entering a level to get rid of incorrect light + ChangeLightXY(Players[MyPlayerId].lightId, Players[MyPlayerId].position.tile); // forces player light refresh } if (!gbSkipSync) {