diff options
author | Paul Gilbert | 2011-03-12 23:33:14 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-03-12 23:33:14 +1100 |
commit | fc3a7b961c80310e283aadc9174c3bd63827d260 (patch) | |
tree | 106cad7a6fb8123ebda721f2722d6cc84e71320f /engines | |
parent | aec1aa0b52294edcdb3eb53bdbba363abd68c208 (diff) | |
download | scummvm-rg350-fc3a7b961c80310e283aadc9174c3bd63827d260.tar.gz scummvm-rg350-fc3a7b961c80310e283aadc9174c3bd63827d260.tar.bz2 scummvm-rg350-fc3a7b961c80310e283aadc9174c3bd63827d260.zip |
TSAGE: Bugfix for cloning the SceneObjectWrapper when a SceneObject is cloned
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/core.cpp | 7 | ||||
-rw-r--r-- | engines/tsage/core.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 8cc0589a85..07548224ed 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1613,6 +1613,13 @@ SceneObject::SceneObject(): SceneHotspot() { _frameChange = 0; } +SceneObject::SceneObject(const SceneObject &so) { + *this = so; + if (_objectWrapper) + // Create a fresh object wrapper for this object + _objectWrapper = new SceneObjectWrapper(); +} + SceneObject::~SceneObject() { delete _mover; delete _objectWrapper; diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 95dd4c6e19..79731bf46a 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -500,6 +500,7 @@ public: uint32 _regionBitList; public: SceneObject(); + SceneObject(const SceneObject &so); virtual ~SceneObject(); void setPosition(const Common::Point &p, int yDiff = 0); |