diff options
author | Eugene Sandulenko | 2014-01-04 17:06:23 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-04 17:06:23 +0200 |
commit | 8515164117c8a4b301c465008a771d50117cef02 (patch) | |
tree | 77531fe203582884a71881f593b3636bad68236d /engines/fullpipe/statics.cpp | |
parent | 0745e61e70ae37a9c10448ad2c96d9e632c8ee58 (diff) | |
download | scummvm-rg350-8515164117c8a4b301c465008a771d50117cef02.tar.gz scummvm-rg350-8515164117c8a4b301c465008a771d50117cef02.tar.bz2 scummvm-rg350-8515164117c8a4b301c465008a771d50117cef02.zip |
FULLPIPE: Proper use of copying consturctor for ExCommand
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r-- | engines/fullpipe/statics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 1c3d11ac54..7178538823 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -708,7 +708,7 @@ void StaticANIObject::update(int counterdiff) { ex = dyn->getExCommand(); if (ex && ex->_messageKind != 35) { - newex = new ExCommand(ex); + newex = ex->createClone(); newex->_excFlags |= 2; if (newex->_messageKind == 17) { newex->_parentId = _id; @@ -741,7 +741,7 @@ void StaticANIObject::update(int counterdiff) { ex = dyn->getExCommand(); if (ex) { if (ex->_messageKind == 35) { - newex = new ExCommand(ex); + newex = ex->createClone(); newex->_excFlags |= 2; newex->sendMessage(); } @@ -1048,7 +1048,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase ExCommand *ex = _movement->_currDynamicPhase->getExCommand(); if (ex) { if (ex->_messageKind == 35) { - ExCommand *newex = new ExCommand(ex); + ExCommand *newex = ex->createClone(); newex->_excFlags |= 2; newex->sendMessage(); } @@ -1858,7 +1858,7 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _field_7C = src->_field_7C; if (src->getExCommand()) - _exCommand = new ExCommand(src->getExCommand()); + _exCommand = src->getExCommand()->createClone(); else _exCommand = 0; |