mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-11-26 22:00:25 +00:00
Fix indicator lights for active signals across save/load
This commit is contained in:
parent
9401198969
commit
7005450479
@ -92,6 +92,12 @@ void sceneInit(struct Scene* scene) {
|
||||
} else {
|
||||
scene->checkpointState = SceneCheckpointStateSaved;
|
||||
checkpointLoadLast(scene);
|
||||
|
||||
// Signal materials are only updated on state change, and the loaded
|
||||
// checkpoint could have active signals. Ensure materials accurately
|
||||
// reflect the state of such signals, before the first scene update
|
||||
// overwrites their previous state.
|
||||
staticRenderCheckSignalMaterials();
|
||||
}
|
||||
|
||||
savefileMarkChapterProgress(gCurrentLevelIndex);
|
||||
|
@ -29,7 +29,7 @@ void signalsInit(unsigned signalCount) {
|
||||
}
|
||||
|
||||
void signalsReset() {
|
||||
int binCount = (gSignalCount + 63) >> 6;
|
||||
int binCount = SIGNAL_BIN_COUNT(gSignalCount);
|
||||
|
||||
for (int i = 0; i < binCount; ++i) {
|
||||
gPrevSignals[i] = gSignals[i];
|
||||
|
Loading…
Reference in New Issue
Block a user