Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-28 19:37:31 +0000
committerStijn Buys <ingar@osirion.org>2008-07-28 19:37:31 +0000
commitd389a31f9816b55d8c7685ec24b9ab814252d693 (patch)
tree9b2577692e543fa6c59fcda508f92c3eb839ac7a /src/core/player.h
parent17408276791033e8122819185abf3bcb01740105 (diff)
zone support
Diffstat (limited to 'src/core/player.h')
-rw-r--r--src/core/player.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/core/player.h b/src/core/player.h
index e37c577..cdcdbd1 100644
--- a/src/core/player.h
+++ b/src/core/player.h
@@ -13,6 +13,7 @@ class Player;
}
#include "core/entity.h"
+#include "core/zone.h"
#include "math/mathlib.h"
#include <string>
@@ -44,6 +45,17 @@ public:
/// the entity the Player is currently controling
inline EntityControlable *control() const { return player_control; }
+ /// set the entity the player is currenty controlling
+ /** This will automaticly set zone() to the zone the entity is in
+ */
+ void set_control(EntityControlable *entitycontrolable);
+
+ /// the zone the player is currently in
+ inline Zone *zone() const { return player_zone; }
+
+ /// set the zone the player is currently in
+ void set_zone(Zone *zone);
+
/// player primary color
inline math::Color const & color() const { return player_color; }
@@ -59,13 +71,13 @@ public:
void serialize_server_update(std::ostream & os) const;
/// receive player info from a stream
- void recieve_server_update(std::istream &is);
+ void receive_server_update(std::istream &is);
/// serialize player info to a stream
void serialize_client_update(std::ostream & os);
/// receive player info from a stream
- void recieve_client_update(std::istream &is);
+ void receive_client_update(std::istream &is);
/// clear all the data
void clear();
@@ -108,12 +120,14 @@ public:
/// player is muted by admin
bool player_mute;
- /// the entity the Player is currently controling
- EntityControlable *player_control;
+ std::list<EntityControlable *> assets;
- std::list<EntityControlable*> assets;
+private:
+ // the entity the Player is currently controling
+ EntityControlable *player_control;
-
+ // the zone the player is currently in
+ Zone *player_zone;
};
}