Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dimming lights in Leorics chamber #3292

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Source/loadsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2086,8 +2086,23 @@ void SaveLevel()
file.WriteLE<int8_t>(objectId);
for (int objectId : AvailableObjects)
file.WriteLE<int8_t>(objectId);
for (int i = 0; i < ActiveObjectCount; i++)
for (int i = 0; i < ActiveObjectCount; i++) {
/* make dynamic light sources unseen when saving level data for level change */
switch (Objects[ActiveObjects[i]]._otype) {
case OBJ_L1LIGHT:
case OBJ_SKFIRE:
case OBJ_CANDLE1:
case OBJ_CANDLE2:
case OBJ_BOOKCANDLE:
case OBJ_STORYCANDLE:
case OBJ_TORCHL:
case OBJ_TORCHR:
case OBJ_TORCHL2:
case OBJ_TORCHR2:
Objects[ActiveObjects[i]]._oVar1 = 0;
}
SaveObject(file, Objects[ActiveObjects[i]]);
}
}

for (int itemId : ActiveItems)
Expand Down