GameLogic - some minor fixes
This commit is contained in:
parent
1eceb6095f
commit
347b546566
|
@ -13,7 +13,7 @@ ClientObject::~ClientObject()
|
||||||
this->client->Disconnect();
|
this->client->Disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientObject::SetPostbox(Oyster::PostBox<NetworkSession::NetEvent>* box)
|
void ClientObject::SetPostbox(Oyster::IPostBox<NetworkSession::NetEvent>* box)
|
||||||
{
|
{
|
||||||
this->box = box;
|
this->box = box;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace DanBias
|
||||||
ClientObject(Oyster::Network::NetworkClient* client);
|
ClientObject(Oyster::Network::NetworkClient* client);
|
||||||
~ClientObject();
|
~ClientObject();
|
||||||
|
|
||||||
void SetPostbox(Oyster::PostBox<NetworkSession::NetEvent>* box);
|
void SetPostbox(Oyster::IPostBox<NetworkSession::NetEvent>* box);
|
||||||
|
|
||||||
GameLogic::Player* Logic_Object();
|
GameLogic::Player* Logic_Object();
|
||||||
Oyster::Network::NetworkClient* NetClient_Object();
|
Oyster::Network::NetworkClient* NetClient_Object();
|
||||||
|
|
|
@ -24,9 +24,9 @@ namespace DanBias
|
||||||
//////// Private
|
//////// Private
|
||||||
void MainLobby::ParseEvents()
|
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;
|
if(e.protocol[0].type != Oyster::Network::NetAttributeType_Short) return;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace DanBias
|
||||||
private:
|
private:
|
||||||
void ParseEvents();
|
void ParseEvents();
|
||||||
|
|
||||||
|
private:
|
||||||
|
//NetworkSession *
|
||||||
};
|
};
|
||||||
}//End namespace DanBias
|
}//End namespace DanBias
|
||||||
#endif // !DANBIASGAME_GAMELOBBY_H
|
#endif // !DANBIASGAME_GAMELOBBY_H
|
||||||
|
|
|
@ -30,11 +30,11 @@ namespace DanBias
|
||||||
if(k == -1)
|
if(k == -1)
|
||||||
{
|
{
|
||||||
this->clients.push_back(client);
|
this->clients.push_back(client);
|
||||||
this->clients[this->clients.size() - 1]->SetPostbox(&this->box);
|
this->clients[this->clients.size() - 1]->SetPostbox(this->box);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->clients[k]->SetPostbox(&this->box);
|
this->clients[k]->SetPostbox(this->box);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientListLock.unlock();
|
ClientListLock.unlock();
|
||||||
|
|
Loading…
Reference in New Issue