Players can now join and leave as they wish. Still TODO: Need to fix player number.

This commit is contained in:
lotodore
2007-05-06 23:27:08 +00:00
parent 87a1abfa42
commit a85ec4ee5a
16 changed files with 439 additions and 39 deletions
+5
View File
@@ -22,6 +22,7 @@
#define _CLIENTTHREAD_H_
#include <core/thread.h>
#include <map>
#include <string>
#include <memory>
#include <net/clientcallback.h>
@@ -52,6 +53,7 @@ public:
ClientCallback &GetCallback();
protected:
typedef std::map<unsigned, std::string> PlayerMap;
// Main function of the thread.
virtual void Main();
@@ -70,6 +72,8 @@ protected:
ClientSenderCallback &GetSenderCallback();
PlayerMap &GetPlayerMap();
private:
std::auto_ptr<ClientContext> m_context;
@@ -81,6 +85,7 @@ private:
std::auto_ptr<ReceiverHelper> m_receiver;
std::auto_ptr<GameData> m_gameData;
PlayerMap m_playerMap;
friend class ClientStateInit;
friend class ClientStateStartResolve;