GameLogic - Pre merge with Netowkr
This commit is contained in:
parent
34d79d1207
commit
7cda07507a
|
@ -18,17 +18,16 @@ namespace DanBias
|
|||
|
||||
void MainLobby::Frame()
|
||||
{
|
||||
if(!this->box.IsEmpty())
|
||||
{
|
||||
NetEvent &e = this->box.Fetch();
|
||||
ParseEvent(e);
|
||||
}
|
||||
ParseEvents();
|
||||
}
|
||||
|
||||
//////// Private
|
||||
void MainLobby::ParseEvent(NetEvent& e)
|
||||
void MainLobby::ParseEvents()
|
||||
{
|
||||
static const short i = MAXSHORT;
|
||||
if(!this->box.IsEmpty())
|
||||
{
|
||||
NetEvent &e = this->box.Fetch();
|
||||
|
||||
if(e.protocol[0].type != Oyster::Network::NetAttributeType_Short) return;
|
||||
|
||||
short f = e.protocol[0].value.netShort;
|
||||
|
@ -36,8 +35,10 @@ namespace DanBias
|
|||
switch (f)
|
||||
{
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}//End namespace DanBias
|
|
@ -15,7 +15,7 @@ namespace DanBias
|
|||
void Frame();
|
||||
|
||||
private:
|
||||
void ParseEvent(NetEvent& e);
|
||||
void ParseEvents();
|
||||
|
||||
};
|
||||
}//End namespace DanBias
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
|
||||
/* THERE CAN ABSOLUTLEY NOT BE TWO DEFINITIONS WITH THE SAME ID!! */
|
||||
|
||||
#define protocol_PlayerNavigation 0
|
||||
#define protocol_PlayerPosition 1
|
||||
#define protocol_ObjectPosition 2
|
||||
#define protocol_Gamplay_PlayerNavigation 0
|
||||
#define protocol_Gamplay_PlayerPosition 1
|
||||
#define protocol_Gamplay_ObjectPosition 2
|
||||
|
||||
#define protocol_Lobby_Msg 60
|
||||
#define protocol_Lobby_Msg 100
|
||||
|
||||
#define protocol_General_Disconnect 100
|
||||
#define protocol_General_Ping 101
|
||||
#define protocol_General_Disconnect 200
|
||||
#define protocol_General_Ping 201
|
||||
|
||||
#define PROTOCOL_TEST 1000
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Oyster
|
|||
template <class T>
|
||||
bool PostBox<T>::IsEmpty()
|
||||
{
|
||||
return !messages.IsEmpty();
|
||||
return messages.IsEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue