summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-12 22:36:18 -0700
committerJared Adams <jaxad0127@gmail.com>2010-03-12 23:53:55 -0700
commitf80e8769ff5c78255bd5e09a991ada83b7ed1aa2 (patch)
treea104ffd960173e7232a70a5d78b4551751ad303c /src/gui
parentef3685ef63999b7132fa7b6f8ebc9a3387972e53 (diff)
downloadmana-client-f80e8769ff5c78255bd5e09a991ada83b7ed1aa2.tar.gz
mana-client-f80e8769ff5c78255bd5e09a991ada83b7ed1aa2.tar.bz2
mana-client-f80e8769ff5c78255bd5e09a991ada83b7ed1aa2.tar.xz
mana-client-f80e8769ff5c78255bd5e09a991ada83b7ed1aa2.zip
Fix some issues with Being deletion
Clear the Viewport's hover being when it gets removed and make sure LocalPlayer's target pointer get's cleared. Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/viewport.cpp6
-rw-r--r--src/gui/viewport.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 1451b935..9befac9d 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -509,3 +509,9 @@ void Viewport::hideBeingPopup()
{
mBeingPopup->setVisible(false);
}
+
+void Viewport::clearHoverBeing(Being *being)
+{
+ if (mHoverBeing == being)
+ mHoverBeing = 0;
+}
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index e4944cd6..e67cc6d3 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -22,6 +22,7 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
+#include "beingmanager.h"
#include "configlistener.h"
#include "position.h"
@@ -157,6 +158,12 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
*/
void hideBeingPopup();
+ protected:
+ friend class BeingManager;
+
+ /// Clears the hovered being if it matches
+ void clearHoverBeing(Being *being);
+
private:
/**
* Finds a path from the player to the mouse, and draws it. This is for