summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index df698cf30..b995338a4 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -447,6 +447,12 @@ void Being::setSpeech(const std::string &text, int time)
if (mSpeech.length() < 1)
return;
+ if (!time && mSpeech.size() < 200)
+ time = SPEECH_TIME - 300 + (3 * mSpeech.size());
+
+ if (time < SPEECH_MIN_TIME)
+ time = SPEECH_MIN_TIME;
+
// Check for links
std::string::size_type start = mSpeech.find('[');
std::string::size_type end = mSpeech.find(']', start);