diff options
author | Kamil Zbróg | 2013-12-02 12:45:34 +0000 |
---|---|---|
committer | Kamil Zbróg | 2013-12-02 12:45:34 +0000 |
commit | f19f61a56da04e0dbd6e46ff9a303fdfb68d8390 (patch) | |
tree | b10cbf38568e8cace510308ce0893541719ee775 /engines/fullpipe/statics.cpp | |
parent | 0f013bf6e1bed6a1e18aa1a4ea16ed1c0105f33d (diff) | |
parent | ccc92b2e707643915efc575cd43fdd11169dc733 (diff) | |
download | scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.gz scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.bz2 scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.zip |
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r-- | engines/fullpipe/statics.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index c86d5abd08..b82875f638 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -152,15 +152,19 @@ StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { _statics = 0; for (uint i = 0; i < src->_movements.size(); i++) { - Movement *mov; - if (((Movement *)src->_movements[i])->_currMovement) { - mov = new Movement(getMovementById(src->getMovementIdById(((Movement *)src->_movements[i])->_id)), this); - mov->_id = ((Movement *)src->_movements[i])->_id; + Movement *newmov; + Movement *mov = (Movement *)src->_movements[i]; + + if (mov->_currMovement) { + // WORKAROUND: Original uses weird construction here: + // new Movement(getMovementById(src->getMovementIdById(mov->_id)), this); + newmov = new Movement(src->getMovementById(src->getMovementIdById(mov->_id)), this); + newmov->_id = mov->_id; } else { - mov = new Movement(((Movement *)src->_movements[i]), 0, -1, this); + newmov = new Movement(mov, 0, -1, this); } - _movements.push_back(mov); + _movements.push_back(newmov); } } @@ -1231,7 +1235,7 @@ Movement::Movement(Movement *src, int *oldIdxs, int newSize, StaticANIObject *an _m2y = src->_m2y; if (newSize != -1) { - if (newSize >= src->_dynamicPhases.size() + 1) + if (newSize >= (int)src->_dynamicPhases.size() + 1) newSize = src->_dynamicPhases.size() + 1; } else { newSize = src->_dynamicPhases.size(); |