diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 5fd8d61263d..5def3cb4a7a 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -50,7 +50,9 @@ bool MctlCompound::load(MfcArchive &file) { for (int i = 0; i < count; i++) { debug(6, "CompoundArray[%d]", i); - MctlCompoundArrayItem *obj = (MctlCompoundArrayItem *)file.readClass(); + MctlCompoundArrayItem *obj = new MctlCompoundArrayItem(); + + obj->_motionControllerObj = (MotionController *)file.readClass(); int count1 = file.readUint32LE(); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 2db3db66764..3e76f24c604 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -61,10 +61,7 @@ class MovGraphReact : public CObject { // Empty }; -class MctlConnectionPointsArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; +typedef Common::Array MctlConnectionPointsArray; class MctlCompoundArrayItem : public CObject { friend class MctlCompound;