diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-23 01:51:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-23 01:51:17 +0300 |
commit | fe39570810969993f51a0ff6045d0a5d4397a5e5 (patch) | |
tree | 6d9641f625fdee333143934c0251cfa0dd870bd3 /src/being.cpp | |
parent | cff9e8d8f4bd6b678ad420c9e17eff729eecae4d (diff) | |
download | plus-fe39570810969993f51a0ff6045d0a5d4397a5e5.tar.gz plus-fe39570810969993f51a0ff6045d0a5d4397a5e5.tar.bz2 plus-fe39570810969993f51a0ff6045d0a5d4397a5e5.tar.xz plus-fe39570810969993f51a0ff6045d0a5d4397a5e5.zip |
Show speach messages variable time, depend on message size.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 6 |
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); |