aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-bots.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-28 14:24:48 +0200
committerEugene Sandulenko2019-09-03 17:17:29 +0200
commit67d45170ede1288967dd3b3c241030a42e925a4d (patch)
tree04ca7758dfc01f8bddd209fb86d45b307690fc5c /engines/hdb/ai-bots.cpp
parent444327deafceef63855a0c052e706ed37c33d53c (diff)
downloadscummvm-rg350-67d45170ede1288967dd3b3c241030a42e925a4d.tar.gz
scummvm-rg350-67d45170ede1288967dd3b3c241030a42e925a4d.tar.bz2
scummvm-rg350-67d45170ede1288967dd3b3c241030a42e925a4d.zip
HDB: More code differences for demo
Diffstat (limited to 'engines/hdb/ai-bots.cpp')
-rw-r--r--engines/hdb/ai-bots.cpp14
1 files changed, 8 insertions, 6 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;