Fixed game state for server.
This commit is contained in:
@@ -103,6 +103,7 @@ ServerGameThread::SendToAllPlayers(boost::shared_ptr<NetPacket> packet)
|
|||||||
void
|
void
|
||||||
ServerGameThread::Main()
|
ServerGameThread::Main()
|
||||||
{
|
{
|
||||||
|
SetState(SERVER_INITIAL_STATE::Instance());
|
||||||
GetSender().Run();
|
GetSender().Run();
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -167,6 +168,7 @@ ServerGameThread::InternalStartGame()
|
|||||||
void
|
void
|
||||||
ServerGameThread::InternalKickPlayer(unsigned playerId)
|
ServerGameThread::InternalKickPlayer(unsigned playerId)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
// SessionWrapper tmpSession = GetSessionByUniquePlayerId(uniqueId);
|
// SessionWrapper tmpSession = GetSessionByUniquePlayerId(uniqueId);
|
||||||
// SessionError(tmpSession, ERR_NET_PLAYER_KICKED);
|
// SessionError(tmpSession, ERR_NET_PLAYER_KICKED);
|
||||||
}
|
}
|
||||||
@@ -174,6 +176,7 @@ ServerGameThread::InternalKickPlayer(unsigned playerId)
|
|||||||
void
|
void
|
||||||
ServerGameThread::AddComputerPlayer(boost::shared_ptr<PlayerData> player)
|
ServerGameThread::AddComputerPlayer(boost::shared_ptr<PlayerData> player)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
m_computerPlayers.push_back(player);
|
m_computerPlayers.push_back(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
#include <gui/guiinterface.h>
|
#include <gui/guiinterface.h>
|
||||||
#include <gamedata.h>
|
#include <gamedata.h>
|
||||||
|
|
||||||
#include <deque>
|
|
||||||
|
|
||||||
#define GAME_THREAD_TERMINATE_TIMEOUT 200
|
#define GAME_THREAD_TERMINATE_TIMEOUT 200
|
||||||
|
|
||||||
|
|
||||||
@@ -62,8 +60,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
typedef std::deque<SessionWrapper > SessionQueue;
|
|
||||||
|
|
||||||
// Main function of the thread.
|
// Main function of the thread.
|
||||||
virtual void Main();
|
virtual void Main();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user