mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 00:45:10 +00:00
FULLPIPE: Fix crash at scene04 start
This commit is contained in:
parent
a742b5fe8c
commit
73612b8979
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user