summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/being
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadmanaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index be998d05d..f924c4b47 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -676,9 +676,6 @@ void Being::takeDamage(Being *restrict const attacker,
BLOCK_START("Being::takeDamage1")
Font *font = nullptr;
- const std::string damage = amount != 0 ? toString(amount) :
- // TRANSLATORS: dodge or miss message in attacks
- type == AttackType::FLEE ? _("dodge") : _("miss");
const Color *color;
if (gui != nullptr)
@@ -766,6 +763,9 @@ void Being::takeDamage(Being *restrict const attacker,
}
if (font != nullptr && particleEngine != nullptr)
{
+ const std::string damage = amount != 0 ? toString(amount) :
+ // TRANSLATORS: dodge or miss message in attacks
+ type == AttackType::FLEE ? _("dodge") : _("miss");
// Show damage number
particleEngine->addTextSplashEffect(damage,
mPixelX,