aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2013-04-21 01:42:14 +0200
committerathrxx2013-04-21 13:14:39 +0200
commit71a1c0a27f71b4ac3de790e2490b24a757d1e795 (patch)
tree009143e20347375f7f6a3d46e542993ff03b8baa /engines
parent5d943f6f67bf31264ba4cd914cb34726502c8d41 (diff)
downloadscummvm-rg350-71a1c0a27f71b4ac3de790e2490b24a757d1e795.tar.gz
scummvm-rg350-71a1c0a27f71b4ac3de790e2490b24a757d1e795.tar.bz2
scummvm-rg350-71a1c0a27f71b4ac3de790e2490b24a757d1e795.zip
KYRA: (EOB) - fix bug #3611077
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/darkmoon.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index 130fb10df3..a694a4aba5 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -243,6 +243,17 @@ void DarkMoonEngine::replaceMonster(int unit, uint16 block, int pos, int dir, in
if (_monsters[i].flags & 0x40)
continue;
+ // WORKAROUND for bug #3611077 (Dran's dragon transformation sequence triggered prematurely):
+ // The boss level and the mindflayer level share the same monster data. If you hang around
+ // long enough in the mindflayer level all 30 monster slots will be used up. When this
+ // happens it will trigger the dragon transformation sequence when Dran is moved around by script.
+ // We avoid removing Dran here by prefering monster slots occupied by monsters from another
+ // sub level.
+ if (_monsters[i].sub != _currentSub) {
+ index = i;
+ break;
+ }
+
int dist = getBlockDistance(_monsters[i].block, _currentBlock);
if (dist > maxDist) {
@@ -261,7 +272,10 @@ void DarkMoonEngine::replaceMonster(int unit, uint16 block, int pos, int dir, in
}
bool DarkMoonEngine::killMonsterExtra(EoBMonsterInPlay *m) {
- if (_currentLevel == 16 && _currentSub == 1 && (_monsterProps[m->type].capsFlags & 4)) {
+ // WORKAROUND for bug #3611077 (see DarkMoonEngine::replaceMonster())
+ // The mindflayers have monster type 0, just like Dran. Using a monster slot occupied by a mindflayer would trigger the dragon transformation
+ // sequence when all 30 monster slots are used up. We avoid this by checking for m->sub == 1.
+ if (_currentLevel == 16 && _currentSub == 1 && m->sub == 1 && (_monsterProps[m->type].capsFlags & 4)) {
if (m->type) {
_playFinale = true;
_runFlag = false;