Browse Source

light fix

pull/6027/head
qndel 5 years ago committed by Anders Jenbo
parent
commit
d97f265cb1
  1. 2
      Source/diablo.cpp
  2. 3
      Source/loadsave.cpp

2
Source/diablo.cpp

@ -2936,6 +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
ProcessLightList();
ProcessVisionList();
}

3
Source/loadsave.cpp

@ -2647,6 +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
}
if (!gbSkipSync) {

Loading…
Cancel
Save