mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-31 04:01:16 +00:00
Match LegoGameState::DeleteState()
This commit is contained in:
parent
8574357c0b
commit
7a1b8f1484
@ -254,25 +254,17 @@ MxResult LegoGameState::DeleteState()
|
|||||||
m_stateCount = 0;
|
m_stateCount = 0;
|
||||||
m_stateArray = NULL;
|
m_stateArray = NULL;
|
||||||
|
|
||||||
if (stateCount > 0) {
|
for (MxS32 count = 0; count < stateCount; count++) {
|
||||||
MxS32 count = stateCount;
|
if (!stateArray[count]->SetFlag() && stateArray[count]->VTable0x14()) {
|
||||||
LegoState** it = stateArray;
|
delete stateArray[count];
|
||||||
|
|
||||||
do {
|
|
||||||
if (!(*it)->SetFlag() && (*it)->VTable0x14()) {
|
|
||||||
delete *it;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RegisterState(*it);
|
RegisterState(stateArray[count]);
|
||||||
*it = NULL;
|
stateArray[count] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
it++;
|
|
||||||
} while (--count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] stateArray;
|
delete[] stateArray;
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user