GameLogic - some minor fixes

This commit is contained in:
Dennis Andersen 2013-12-18 08:44:10 +01:00
parent 1eceb6095f
commit 347b546566
5 changed files with 8 additions and 6 deletions

View File

@ -13,7 +13,7 @@ ClientObject::~ClientObject()
this->client->Disconnect();
}
void ClientObject::SetPostbox(Oyster::PostBox<NetworkSession::NetEvent>* box)
void ClientObject::SetPostbox(Oyster::IPostBox<NetworkSession::NetEvent>* box)
{
this->box = box;
}

View File

@ -16,7 +16,7 @@ namespace DanBias
ClientObject(Oyster::Network::NetworkClient* client);
~ClientObject();
void SetPostbox(Oyster::PostBox<NetworkSession::NetEvent>* box);
void SetPostbox(Oyster::IPostBox<NetworkSession::NetEvent>* box);
GameLogic::Player* Logic_Object();
Oyster::Network::NetworkClient* NetClient_Object();

View File

@ -24,9 +24,9 @@ namespace DanBias
//////// Private
void MainLobby::ParseEvents()
{
if(!this->box.IsEmpty())
if(!this->box->IsEmpty())
{
NetEvent &e = this->box.Fetch();
NetEvent &e = this->box->Fetch();
if(e.protocol[0].type != Oyster::Network::NetAttributeType_Short) return;

View File

@ -17,6 +17,8 @@ namespace DanBias
private:
void ParseEvents();
private:
//NetworkSession *
};
}//End namespace DanBias
#endif // !DANBIASGAME_GAMELOBBY_H

View File

@ -30,11 +30,11 @@ namespace DanBias
if(k == -1)
{
this->clients.push_back(client);
this->clients[this->clients.size() - 1]->SetPostbox(&this->box);
this->clients[this->clients.size() - 1]->SetPostbox(this->box);
}
else
{
this->clients[k]->SetPostbox(&this->box);
this->clients[k]->SetPostbox(this->box);
}
ClientListLock.unlock();