GRIM: Expire the TextObjects only when the speech mode is TextOnly or a movie is playing.

This commit is contained in:
Giulio Camuffo 2011-05-23 19:26:46 +02:00
parent 82ad8ee365
commit d1d0dfe909

View File

@ -902,7 +902,9 @@ void Actor::sayLine(const char *msg, const char *msgId) {
_sayLineText->setDefaults(&g_grim->_sayLineDefaults);
_sayLineText->setText(msg);
_sayLineText->setFGColor(_talkColor);
_sayLineText->setDuration((float)strlen(msg) * 20.f / sqrt((float)g_grim->getTextSpeed() / 10.f));
if (m == GrimEngine::TextOnly || g_grim->getMode() == ENGINE_MODE_SMUSH) {
_sayLineText->setDuration((float)strlen(msg) * 20.f / sqrt((float)g_grim->getTextSpeed() / 10.f));
}
if (g_grim->getMode() == ENGINE_MODE_SMUSH) {
_sayLineText->setX(640 / 2);
_sayLineText->setY(456);