aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-21 21:21:35 -0500
committerPaul Gilbert2018-02-23 15:23:20 -0500
commit5e0782c8da3becccfc5f647d346b44cd1860756e (patch)
tree81ddd1b9e79d7a1a2df36e3be17dd6d94265e197 /engines
parentad7b947da324c7e3219e4fb2e47bce1006327d97 (diff)
downloadscummvm-rg350-5e0782c8da3becccfc5f647d346b44cd1860756e.tar.gz
scummvm-rg350-5e0782c8da3becccfc5f647d346b44cd1860756e.tar.bz2
scummvm-rg350-5e0782c8da3becccfc5f647d346b44cd1860756e.zip
XEEN: Fix loading maps with no monsters
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/map.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index e3ab879e65..c62fc710a5 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -808,17 +808,18 @@ void MonsterObjectData::synchronize(XeenSerializer &s, MonsterData &monsterData)
mon._sprites = &_monsterSprites[mon._id]._sprites;
mon._attackSprites = &_monsterSprites[mon._id]._attackSprites;
mon._monsterData = &monsterData[mon._spriteId];
+
+ MonsterStruct &md = *mon._monsterData;
+ mon._hp = md._hp;
+ mon._effect1 = mon._effect2 = md._animationEffect;
+ if (md._animationEffect)
+ mon._effect3 = _vm->getRandomNumber(7);
+
+ _monsters.push_back(mon);
} else {
assert(!mon._id);
}
- MonsterStruct &md = *mon._monsterData;
- mon._hp = md._hp;
- mon._effect1 = mon._effect2 = md._animationEffect;
- if (md._animationEffect)
- mon._effect3 = _vm->getRandomNumber(7);
-
- _monsters.push_back(mon);
mobStruct.synchronize(s);
} while (mobStruct._id != 255 || mobStruct._pos.x != -1);