GRIM: Allow SayLine messages of zero length. Fixes #199

This commit is contained in:
Joni Vähämäki 2011-06-11 18:25:25 +03:00
parent 27ec9c2920
commit 5ea33b4f7f
2 changed files with 29 additions and 28 deletions

View file

@ -888,6 +888,7 @@ void Actor::sayLine(const char *msg, const char *msgId, bool background) {
_sayLineText = 0;
}
if (msg[0] != 0) {
GrimEngine::SpeechMode m = g_grim->getSpeechMode();
if (!g_grim->_sayLineDefaults.getFont() || m == GrimEngine::VoiceOnly || background)
return;
@ -916,6 +917,7 @@ void Actor::sayLine(const char *msg, const char *msgId, bool background) {
g_grim->registerTextObject(textObject);
if (g_grim->getMode() != ENGINE_MODE_SMUSH)
_sayLineText = textObject->getId();
}
}
bool Actor::isTalking() {

View file

@ -498,11 +498,10 @@ void L1_SayLine() {
}
paramObj = lua_getparam(paramId++);
}
if (!msg.empty()) {
actor->sayLine(msg.c_str(), msgId, background); //background, vol, pan, x, y
}
}
}
}
void L1_ShutUpActor() {