duncan
Mom and Dad were wrong!
/home/malcolm/tmp/duncan/prototype/0/server/player.h
00001 #ifndef SERVER_PLAYER_H_
00002 #define SERVER_PLAYER_H_
00003 
00004 #include "../network/network.h"
00005 #include "character.h"
00006 #include <algorithm>
00007 #include <list>
00008 #include <stack>
00009 #include <string>
00010 #include <tr1/memory>
00011 #include <vector>
00012 
00013 namespace server {
00014 
00023 class Player : public Character {
00024         private:
00025                 net::index_t enet_index_;
00026 
00028                 static const size_t kPacketPoolSize = 10;
00029 
00031                 std::vector<net::Packet> packets_;
00032 
00034                 std::stack<size_t> available_;
00035 
00037                 std::list<size_t> used_;
00038 
00039                 net::Packet* clean_packet(size_t);
00040         public:
00041                 Player();
00042 
00044                 typedef std::pair<net::Packet*,net::Packet*> pppair_t;
00045 
00046                 bool connected;
00047                 size_t windex;
00048                 std::string changeworld;
00049                 double last_pos_send;
00050 
00051                 Player(net::index_t);
00052                 net::Packet* next_packet();
00053                 pppair_t demand_packet();
00054                 void pop_packet(net::Packet*);
00055 
00056                 net::index_t enet_index();
00057 
00058                 virtual bool can_find_path();
00059 };
00060 
00061 }
00062 
00063 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations