mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-24 18:32:19 -05:00
fix object unload using wrong index (#3949)
This commit is contained in:
parent
30a063b75d
commit
19af4481c0
@ -178,7 +178,7 @@ bool Scene_CommandObjectList(PlayState* play, LUS::ISceneCommand* cmd) {
|
|||||||
// Loop until a mismatch in the object lists
|
// Loop until a mismatch in the object lists
|
||||||
// Then clear all object ids past that in the context object list and kill actors for those objects
|
// Then clear all object ids past that in the context object list and kill actors for those objects
|
||||||
for (i = play->objectCtx.unk_09, k = 0; i < play->objectCtx.num; i++, k++) {
|
for (i = play->objectCtx.unk_09, k = 0; i < play->objectCtx.num; i++, k++) {
|
||||||
if (i >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) {
|
if (k >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) {
|
||||||
for (j = i; j < play->objectCtx.num; j++) {
|
for (j = i; j < play->objectCtx.num; j++) {
|
||||||
play->objectCtx.status[j].id = OBJECT_INVALID;
|
play->objectCtx.status[j].id = OBJECT_INVALID;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user