mirror of
https://codeberg.org/KeybadeBlox/JSRF-Decompilation.git
synced 2026-02-20 10:17:03 +03:00
Add to GameObj::removeChildrenFromObjList()
This commit is contained in:
parent
35c8844529
commit
e668b52cd0
2 changed files with 6 additions and 1 deletions
|
|
@ -184,7 +184,13 @@ void GameObj::removeFromObjList(GameObj * obj) {
|
||||||
void GameObj::removeChildrenFromObjList(GameObj * firstChild) {
|
void GameObj::removeChildrenFromObjList(GameObj * firstChild) {
|
||||||
if (firstChild != NULL) do {
|
if (firstChild != NULL) do {
|
||||||
if (firstChild->flags > -1) {
|
if (firstChild->flags > -1) {
|
||||||
|
firstChild->flags = GameObjFlags(firstChild->flags | GOF_DELETEAFTEREXEC);
|
||||||
|
g_game->removeFromDrawList(firstChild);
|
||||||
|
g_game->unsetObj(firstChild->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->removeChildrenFromObjList(firstChild->firstChild);
|
||||||
|
firstChild = firstChild->nextSibling;
|
||||||
} while (firstChild != NULL);
|
} while (firstChild != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,6 @@ struct GameObj {
|
||||||
void removeFromObjList (GameObj * obj);
|
void removeFromObjList (GameObj * obj);
|
||||||
void removeChildrenFromObjList(GameObj * firstChild);
|
void removeChildrenFromObjList(GameObj * firstChild);
|
||||||
|
|
||||||
|
|
||||||
// Each frame, one of these trios of methods is called depending on
|
// Each frame, one of these trios of methods is called depending on
|
||||||
// which state the game is in
|
// which state the game is in
|
||||||
// Default implementation of each does nothing; inheriting objects
|
// Default implementation of each does nothing; inheriting objects
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue