summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp3
-rw-r--r--src/game.cpp2
-rw-r--r--src/localplayer.cpp6
-rw-r--r--src/localplayer.h3
4 files changed, 9 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 0b4ac3ccd..d8e3119b5 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -1793,6 +1793,9 @@ bool Being::updateFromCache()
void Being::addToCache()
{
+ if (player_node == this)
+ return;
+
BeingCacheEntry *entry = Being::getCacheEntry(getId());
if (!entry)
{
diff --git a/src/game.cpp b/src/game.cpp
index 21f03d42c..0082040dc 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1100,6 +1100,8 @@ void Game::handleInput()
}
Client::setFramerate(fpsLimit);
}
+ if (player_node)
+ player_node->updateName();
if (event.active.state & SDL_APPINPUTFOCUS)
Client::setInputFocused(event.active.gain);
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 861bfb642..95f2dc83d 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -113,7 +113,6 @@ LocalPlayer::LocalPlayer(int id, int subtype):
mAwayDialog(0),
mAfkTime(0),
mAwayMode(false),
- mHalfAwayMode(false),
mShowNavigePath(false),
mDrawPath(false),
mActivityTime(0),
@@ -351,7 +350,7 @@ void LocalPlayer::logic()
if (mAwayMode)
smile += FLAG_AWAY;
- if (mHalfAwayMode)
+ if (mInactive)
smile += FLAG_INACTIVE;
if (emote(smile))
@@ -3160,7 +3159,8 @@ void LocalPlayer::changeAwayMode()
{
mAwayMode = !mAwayMode;
mAfkTime = 0;
- mHalfAwayMode = false;
+ mInactive = false;
+ updateName();
if (miniStatusWindow)
miniStatusWindow->updateStatus();
if (mAwayMode)
diff --git a/src/localplayer.h b/src/localplayer.h
index 3a97511f5..81232e4b6 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -332,7 +332,7 @@ class LocalPlayer : public Being, public ActorSpriteListener,
void setAway(const std::string &message);
void setHalfAway(bool n)
- { mHalfAwayMode = n; }
+ { mInactive = n;}
void afkRespond(ChatTab *tab, const std::string &nick);
@@ -568,7 +568,6 @@ class LocalPlayer : public Being, public ActorSpriteListener,
int mPingTime;
int mAfkTime;
bool mAwayMode;
- bool mHalfAwayMode;
bool mShowNavigePath;
bool mIsServerBuggy;