summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-09 21:24:13 -0700
committerIra Rice <irarice@gmail.com>2009-01-09 21:24:13 -0700
commit0dabbade690301ef89da2fb2562da8e48afc22d3 (patch)
treeaf73cc3f45c48dc0cf97b8c0fc3048f11eaaec03 /src/localplayer.h
parent43630ab7969fa26cb0a3e2773e7266f2f9647867 (diff)
downloadmana-client-0dabbade690301ef89da2fb2562da8e48afc22d3.tar.gz
mana-client-0dabbade690301ef89da2fb2562da8e48afc22d3.tar.bz2
mana-client-0dabbade690301ef89da2fb2562da8e48afc22d3.tar.xz
mana-client-0dabbade690301ef89da2fb2562da8e48afc22d3.zip
Added the ability to see your own name in game.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 0760f226..28551a22 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -57,7 +57,7 @@ class LocalPlayer : public Player
*/
~LocalPlayer();
- void setName(const std::string &name) {Being::setName(name); }
+ virtual void setName(const std::string &name);
void setNetwork(Network *network) { mNetwork = network; }
Network *getNetwork() {return mNetwork; }
virtual void logic();
@@ -126,6 +126,14 @@ class LocalPlayer : public Player
void attack(Being *target = NULL, bool keep = false);
+ /**
+ * Triggers whether or not to show the name as a GM name.
+ * NOTE: This doesn't mean that just anyone can use this.
+ * If the server doesn't acknowlege you, you won't be shown
+ * as a GM on other people's clients.
+ */
+ virtual void setGM();
+
void stopAttack();
Being* getTarget() const;
@@ -212,6 +220,10 @@ class LocalPlayer : public Player
Uint16 mStatPoint, mSkillPoint;
Uint16 mStatsPointsToAttribute;
+ bool mUpdateName; /** Whether or not the name settings have changed */
+
+ bool mMapInitialized; /** Whether or not the map is available yet */
+
float mLastAttackTime; /**< Used to synchronize the charge dialog */
void drawTargetCursor(Graphics *graphics, int offsetX, int offsetY);
@@ -232,15 +244,15 @@ class LocalPlayer : public Player
FloorItem *mPickUpTarget;
bool mTrading;
- bool mInStorage; /**< Whether storage is currently accessible */
+ bool mInStorage; /**< Whether storage is currently accessible */
bool mGoingToTarget;
- bool mKeepAttacking;/** Whether or not to continue to attack */
- int mTargetTime; /** How long the being has been targeted **/
- int mLastAction; /**< Time stamp of the last action, -1 if none. */
- int mLastTarget; /** Time stamp of last targeting action, -1 if none. */
- int mWalkingDir; /**< The direction the player is walking in. */
- int mDestX; /**< X coordinate of destination. */
- int mDestY; /**< Y coordinate of destination. */
+ bool mKeepAttacking; /** Whether or not to continue to attack */
+ int mTargetTime; /** How long the being has been targeted **/
+ int mLastAction; /**< Time stamp of the last action, -1 if none. */
+ int mLastTarget; /** Time stamp of last targeting action, -1 if none. */
+ int mWalkingDir; /**< The direction the player is walking in. */
+ int mDestX; /**< X coordinate of destination. */
+ int mDestY; /**< Y coordinate of destination. */
Inventory *mInventory;
Inventory *mStorage;
@@ -259,6 +271,8 @@ class LocalPlayer : public Player
// Load the target cursors into memory
void initTargetCursor();
+
+ virtual void updateCoords();
};
extern LocalPlayer *player_node;