From 1a37636032ce4cd5c356656b2a4f81b55371f5c8 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 8 Apr 2005 16:40:14 +0000 Subject: Fixed damage scrolling up to restart from below on new hit. --- src/being.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index fd369a42..ed2a62f5 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -114,6 +114,7 @@ void sort() { Being::Being(): speech_time(0), + damage(""), damage_time(0), damage_y(0.0), id(0), job(0), x(0), y(0), destX(0), destY(0), direction(0), type(0), action(0), frame(0), @@ -123,8 +124,7 @@ Being::Being(): emotion(0), emotion_time(0), text_x(0), text_y(0), hair_style(1), hair_color(1), - weapon(0), - damage(""), damage_time(0), damage_y(0.0) + weapon(0) { } @@ -163,6 +163,7 @@ void Being::setDamage(const std::string &text, int time) { damage = text; damage_time = time; + damage_y = 0; } void Being::nextStep() @@ -226,8 +227,7 @@ void Being::drawSpeech(Graphics *graphics) text_x + 60, text_y - 60 - (int)damage_y, gcn::Graphics::CENTER); damage_y += 0.5; - } else - damage_y = 0; + } } void Being::tick() -- cgit v1.2.3-70-g09d2