diff options
-rw-r--r-- | engines/hdb/ai-bots.cpp | 14 | ||||
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 6 | ||||
-rw-r--r-- | engines/hdb/ai-player.cpp | 13 |
3 files changed, 23 insertions, 10 deletions
diff --git a/engines/hdb/ai-bots.cpp b/engines/hdb/ai-bots.cpp index 3db6cd3be2..408d364991 100644 --- a/engines/hdb/ai-bots.cpp +++ b/engines/hdb/ai-bots.cpp @@ -935,7 +935,7 @@ void aiMaintBotAction(AIEntity *e) { if (!e->value2) switch (e->sequence) { case 50: - if (e->onScreen && !e->int1) { + if (e->onScreen && !e->int1 && !g_hdb->isDemo()) { if (g_hdb->_rnd->getRandomNumber(1)) g_hdb->_sound->playSound(SND_MBOT_HMMM2); else @@ -994,7 +994,7 @@ void aiMaintBotAction(AIEntity *e) { switch (e->sequence) { // HMM case 50: - if (e->onScreen && !e->int1) + if (e->onScreen && !e->int1 && !g_hdb->isDemo()) g_hdb->_sound->playSound(SND_MBOT_HMMM); break; // Look Right @@ -1009,7 +1009,7 @@ void aiMaintBotAction(AIEntity *e) { break; // HMM2 case 25: - if (e->onScreen && !e->int1) + if (e->onScreen && !e->int1 && !g_hdb->isDemo()) g_hdb->_sound->playSound(SND_MBOT_HMMM2); break; // Decide direction and GO @@ -1017,7 +1017,7 @@ void aiMaintBotAction(AIEntity *e) { int dir = (g_hdb->_rnd->getRandomNumber(3)) + 1; e->dir = dirList[dir]; g_hdb->_ai->findPath(e); - if (e->onScreen) + if (e->onScreen && !g_hdb->isDemo()) g_hdb->_sound->playSound(whistles[g_hdb->_rnd->getRandomNumber(2)]); break; } @@ -1030,7 +1030,8 @@ void aiMaintBotAction(AIEntity *e) { g_hdb->_ai->animateEntity(e); if (hitPlayer(e->x, e->y)) { g_hdb->_ai->killPlayer(DEATH_GRABBED); - g_hdb->_sound->playSound(SND_MBOT_DEATH); + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(SND_MBOT_DEATH); } } else { // Check if there's an arrow UNDER the bot, and if its RED @@ -1049,7 +1050,8 @@ void aiMaintBotAction(AIEntity *e) { return; } else if (ar->type == 1) { g_hdb->_ai->findPath(e); - g_hdb->_sound->playSound(whistles[g_hdb->_rnd->getRandomNumber(2)]); + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(whistles[g_hdb->_rnd->getRandomNumber(2)]); } else { e->sequence = 64; e->dir2 = e->dir; diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index fe391665e6..abdcd6ebe5 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1209,7 +1209,8 @@ void AI::animateEntity(AIEntity *e) { } else { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); removeEntity(e); - g_hdb->_sound->playSound(SND_BARREL_MELTING); + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(SND_BARREL_MELTING); return; } } @@ -1217,7 +1218,8 @@ void AI::animateEntity(AIEntity *e) { if (!checkFloating(e->tileX, e->tileY)) { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); floatEntity(e, STATE_MELTED); - g_hdb->_sound->playSound(SND_BARREL_MELTING); + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(SND_BARREL_MELTING); } } else if (flags & kFlagSlide) { int xv = 0, yv = 0; diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index 4e70436b23..b93133f506 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -761,7 +761,10 @@ void aiBarrelExplode(AIEntity *e) { e->state = STATE_EXPLODING; e->animDelay = e->animCycle; e->animFrame = 0; - g_hdb->_sound->playSound(SND_BARREL_EXPLODE); + + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); + g_hdb->_map->setBoomBarrel(e->tileX, e->tileY, 0); } @@ -1052,6 +1055,9 @@ void aiSlugAttackDraw(AIEntity *e, int mx, int my) { } void aiSlugAttackInit(AIEntity *e) { + if (g_hdb->isDemo()) + return; + int xv[5] = {9, 0, 0, -1, 1}, yv[5] = {9, -1, 1, 0, 0}; e->moveSpeed = kPlayerMoveSpeed << 1; g_hdb->_ai->setEntityGoal(e, e->tileX + xv[e->dir], e->tileY + yv[e->dir]); @@ -1416,7 +1422,10 @@ void aiMagicEggUse(AIEntity *e) { if (spawned) { g_hdb->_ai->addAnimateTarget(e->tileX * kTileWidth, e->tileY * kTileHeight, 0, 3, ANIM_NORMAL, false, false, GROUP_EXPLOSION_BOOM_SIT); - g_hdb->_sound->playSound(SND_BARREL_EXPLODE); + + if (!g_hdb->isDemo()) + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); + g_hdb->_ai->removeEntity(e); } } |