diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-16 02:19:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-16 02:19:08 +0300 |
commit | 19b82b4dad9b66418a4e7d0ed0ba23d0cab17216 (patch) | |
tree | 0f82530b8e11d70923e96d5ba17107f92921365f /src/being | |
parent | b49d05166ac67ed0ef189b1e3859573108843db1 (diff) | |
download | mv-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.gz mv-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.bz2 mv-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.xz mv-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.zip |
Remove default parameters from Being::setSpeech.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 20 | ||||
-rw-r--r-- | src/being/being.h | 4 |
2 files changed, 6 insertions, 18 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 61826f494..8cd80d4dc 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -564,19 +564,11 @@ void Being::setPath(const Path &restrict path) restrict2 } } -void Being::setSpeech(const std::string &restrict text, - const std::string &restrict channel, - int time) restrict2 +void Being::setSpeech(const std::string &restrict text) restrict2 { if (userPalette == nullptr) return; - if (!channel.empty() && - ((langChatTab == nullptr) || langChatTab->getChannelName() != channel)) - { - return; - } - // Remove colors mSpeech = removeColors(text); @@ -591,12 +583,10 @@ void Being::setSpeech(const std::string &restrict text, if (mSpeech.empty()) return; - if (time == 0) - { - const size_t sz = mSpeech.size(); - if (sz < 200) - time = CAST_S32(SPEECH_TIME - 300 + (3 * sz)); - } + const size_t sz = mSpeech.size(); + int time = 0; + if (sz < 200) + time = CAST_S32(SPEECH_TIME - 300 + (3 * sz)); if (time < CAST_S32(SPEECH_MIN_TIME)) time = CAST_S32(SPEECH_MIN_TIME); diff --git a/src/being/being.h b/src/being/being.h index feb686740..64a193c46 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -185,9 +185,7 @@ class Being notfinal : public ActorSprite, * @param text The text that should appear. * @param time The amount of time the text should stay in milliseconds. */ - void setSpeech(const std::string &restrict text, - const std::string &restrict channel = "", - int time = 0) restrict2; + void setSpeech(const std::string &restrict text) restrict2; /** * Puts a damage bubble above this being. |