summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
commit3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (patch)
tree5084eaa47d4874a3a573de226f19c4be072e4888 /src/being.cpp
parent19d5cc3a6bbbd911361b7e8b956840d0189d4c2b (diff)
downloadmana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.gz
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.bz2
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.xz
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.zip
Reverted changeset r2269 (toString) as requested by ElvenProgrammer.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index a74efe5f..5ee8276c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -22,6 +22,8 @@
*/
#include "being.h"
+#include <sstream>
+
#include "game.h"
#include "graphics.h"
#include "log.h"
@@ -31,8 +33,6 @@
#include "gui/gui.h"
-#include "utils/tostring.h"
-
extern Spriteset *emotionset;
PATH_NODE::PATH_NODE(Uint16 iX, Uint16 iY):
@@ -120,7 +120,13 @@ Being::setSpeech(const std::string &text, Uint32 time)
void
Being::setDamage(Sint16 amount, Uint32 time)
{
- mDamage = amount ? toString(amount) : "miss";
+ if (!amount) {
+ mDamage = "miss";
+ } else {
+ std::stringstream damageString;
+ damageString << amount;
+ mDamage = damageString.str();
+ }
mDamageTime = tick_time;
mShowDamage = true;
}