summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
commit19b82b4dad9b66418a4e7d0ed0ba23d0cab17216 (patch)
tree0f82530b8e11d70923e96d5ba17107f92921365f /src/being
parentb49d05166ac67ed0ef189b1e3859573108843db1 (diff)
downloadplus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.gz
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.bz2
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.xz
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.zip
Remove default parameters from Being::setSpeech.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp20
-rw-r--r--src/being/being.h4
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.