summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 01:02:46 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 01:02:46 +0000
commit7fe28c4550c2ae82b796ebd2d05a9dcac1f9e384 (patch)
tree26d02901189875ae8766354ac8930f4733640641 /src/being.cpp
parent486c57304076b7352a588dff08c2b976a76e1608 (diff)
downloadmana-7fe28c4550c2ae82b796ebd2d05a9dcac1f9e384.tar.gz
mana-7fe28c4550c2ae82b796ebd2d05a9dcac1f9e384.tar.bz2
mana-7fe28c4550c2ae82b796ebd2d05a9dcac1f9e384.tar.xz
mana-7fe28c4550c2ae82b796ebd2d05a9dcac1f9e384.zip
Made Being::setDamage accept a short instead of a string.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 3fdc2f2b..4ba88a33 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -233,9 +233,15 @@ void Being::setSpeech(const std::string &text, int time)
showSpeech = true;
}
-void Being::setDamage(const std::string &text, int time)
+void Being::setDamage(short amount, int time)
{
- damage = text;
+ if (!amount) {
+ damage = "miss";
+ } else {
+ std::stringstream damageString;
+ damageString << amount;
+ damage = damageString.str();
+ }
damage_time = tick_time;
showDamage = true;
}