From 548e6e3f52a9877f28459b2ae4205d8e4855aceb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 Oct 2013 08:35:28 -0400 Subject: TSAGE: R2R bugfix for objects being removed and then readded incorrectly --- engines/tsage/core.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index f7fbb1daa1..6f356d8c44 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2482,7 +2482,8 @@ void SceneObject::postInit(SceneObjectList *OwnerList) { if (!OwnerList) OwnerList = g_globals->_sceneObjects; - if (!OwnerList->contains(this) || ((_flags & OBJFLAG_REMOVE) != 0)) { + bool isExisting = OwnerList->contains(this); + if (!isExisting || ((_flags & OBJFLAG_REMOVE) != 0)) { _percent = 100; _priority = 255; _flags = OBJFLAG_ZOOMED; @@ -2501,7 +2502,8 @@ void SceneObject::postInit(SceneObjectList *OwnerList) { _numFrames = 10; _regionBitList = 0; - OwnerList->push_back(this); + if (!isExisting) + OwnerList->push_back(this); _flags |= OBJFLAG_PANES; } } -- cgit v1.2.3