summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-03-19 20:43:10 +0000
commit654d24e74c56d240b8d622840c135e22a029636d (patch)
tree5eb8b94f7832bdbb6d21c7ded6e6da6b5f8f3464 /src/being.cpp
parent3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (diff)
downloadmana-654d24e74c56d240b8d622840c135e22a029636d.tar.gz
mana-654d24e74c56d240b8d622840c135e22a029636d.tar.bz2
mana-654d24e74c56d240b8d622840c135e22a029636d.tar.xz
mana-654d24e74c56d240b8d622840c135e22a029636d.zip
Unreverted latest change by Doener due to my lack of proper communication abilities.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 5ee8276c..a74efe5f 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -22,8 +22,6 @@
*/
#include "being.h"
-#include <sstream>
-
#include "game.h"
#include "graphics.h"
#include "log.h"
@@ -33,6 +31,8 @@
#include "gui/gui.h"
+#include "utils/tostring.h"
+
extern Spriteset *emotionset;
PATH_NODE::PATH_NODE(Uint16 iX, Uint16 iY):
@@ -120,13 +120,7 @@ Being::setSpeech(const std::string &text, Uint32 time)
void
Being::setDamage(Sint16 amount, Uint32 time)
{
- if (!amount) {
- mDamage = "miss";
- } else {
- std::stringstream damageString;
- damageString << amount;
- mDamage = damageString.str();
- }
+ mDamage = amount ? toString(amount) : "miss";
mDamageTime = tick_time;
mShowDamage = true;
}