aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/startrek/room.cpp')
-rw-r--r--engines/startrek/room.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index ebd3074e5f..4ec703f69d 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -480,7 +480,9 @@ void Room::spockScan(int direction, TextRef text, bool changeDirection) {
loadActorAnim2(OBJECT_SPOCK, anim, -1, -1, 0);
playSoundEffectIndex(SND_TRICORDER);
- showText(TX_SPEAKER_SPOCK, text);
+
+ if (text != -1)
+ showText(TX_SPEAKER_SPOCK, text);
}
void Room::mccoyScan(int direction, TextRef text, bool changeDirection) {
@@ -493,7 +495,9 @@ void Room::mccoyScan(int direction, TextRef text, bool changeDirection) {
loadActorAnim2(OBJECT_MCCOY, anim, -1, -1, 0);
playSoundEffectIndex(SND_TRICORDER);
- showText(TX_SPEAKER_MCCOY, text);
+
+ if (text != -1)
+ showText(TX_SPEAKER_MCCOY, text);
}
}