summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e3a690441..6721d4031 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -547,7 +547,7 @@ void Being::setPixelPositionF(const Vector &restrict pos) restrict2
if (mText)
{
mText->adviseXY(CAST_S32(pos.x),
- CAST_S32(pos.y) - getHeight() - mText->getHeight() - 6,
+ CAST_S32(pos.y) - getHeight() - mText->getHeight() - 9,
mMoveNames);
}
}
@@ -657,12 +657,16 @@ void Being::setSpeech(const std::string &restrict text,
if (speech == BeingSpeech::TEXT_OVERHEAD)
{
delete mText;
+ mText = nullptr;
mText = new Text(mSpeech,
mPixelX,
mPixelY - getHeight(),
Graphics::CENTER,
&userPalette->getColor(UserColorId::PARTICLE),
Speech_true);
+ mText->adviseXY(mPixelX,
+ (mY + 1) * mapTileSize - getHeight() - mText->getHeight() - 9,
+ mMoveNames);
}
else
{
@@ -1802,13 +1806,7 @@ void Being::logic() restrict2
{
mSpeechTime--;
if (mSpeechTime == 0 && mText != nullptr)
- {
- delete2(mText)
- }
- else if (mText != nullptr)
- {
delete2(mText)
- }
}
const int time = tick_time * MILLISECONDS_IN_A_TICK;
@@ -2228,6 +2226,9 @@ void Being::drawSpeech(const int offsetX,
Graphics::CENTER,
&theme->getColor(ThemeColorId::BUBBLE_TEXT, 255),
Speech_true);
+ mText->adviseXY(mPixelX,
+ (mY + 1) * mapTileSize - getHeight() - mText->getHeight() - 9,
+ mMoveNames);
}
}
else if (speech == BeingSpeech::NO_SPEECH)