From fc3a7b961c80310e283aadc9174c3bd63827d260 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 12 Mar 2011 23:33:14 +1100 Subject: TSAGE: Bugfix for cloning the SceneObjectWrapper when a SceneObject is cloned --- engines/tsage/core.cpp | 7 +++++++ engines/tsage/core.h | 1 + 2 files changed, 8 insertions(+) (limited to 'engines') 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); -- cgit v1.2.3