aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2013-10-05 08:35:28 -0400
committerPaul Gilbert2013-10-05 08:35:28 -0400
commit548e6e3f52a9877f28459b2ae4205d8e4855aceb (patch)
treef731b4b892b35e52d667dfb0e26d85eb14e6b503 /engines
parentb408b94bf1e188da7202895eab547f08cfa30450 (diff)
downloadscummvm-rg350-548e6e3f52a9877f28459b2ae4205d8e4855aceb.tar.gz
scummvm-rg350-548e6e3f52a9877f28459b2ae4205d8e4855aceb.tar.bz2
scummvm-rg350-548e6e3f52a9877f28459b2ae4205d8e4855aceb.zip
TSAGE: R2R bugfix for objects being removed and then readded incorrectly
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/core.cpp6
1 files 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;
}
}