diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/being | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 6 |
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, |