mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-01 20:51:15 +00:00
Match
This commit is contained in:
parent
8ec140551b
commit
60f65ba340
@ -278,7 +278,9 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
MxString savePath;
|
||||
GetFileSavePath(&savePath, p_slot);
|
||||
|
||||
if (fileStream.Open(savePath.GetData(), LegoFile::c_read) != FAILURE) {
|
||||
if (fileStream.Open(savePath.GetData(), LegoFile::c_read) == FAILURE)
|
||||
goto done;
|
||||
|
||||
MxU32 version;
|
||||
Read(&fileStream, &version);
|
||||
|
||||
@ -298,6 +300,7 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
SetActor(m_actorId);
|
||||
}
|
||||
|
||||
const char* lightPosition;
|
||||
MxU32 status;
|
||||
do {
|
||||
status = ReadVariable(&fileStream, variableTable);
|
||||
@ -307,7 +310,7 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
} while (status != 2);
|
||||
|
||||
m_backgroundColor->SetLights();
|
||||
const char* lightPosition = VariableTable()->GetVariable("lightposition");
|
||||
lightPosition = VariableTable()->GetVariable("lightposition");
|
||||
|
||||
if (lightPosition) {
|
||||
SetLightPosition(atoi(lightPosition));
|
||||
@ -362,7 +365,6 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
|
||||
result = SUCCESS;
|
||||
m_isDirty = FALSE;
|
||||
}
|
||||
|
||||
done:
|
||||
if (result != SUCCESS) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user