Added General Protocol to DataRecieved overloads

This commit is contained in:
Dander7BD 2014-02-12 09:54:33 +01:00
parent 6bf7bc898e
commit fdb7a7e1b6
2 changed files with 128 additions and 111 deletions

View File

@ -496,10 +496,8 @@ void GameState::DataRecieved( NetEvent<NetworkClient*, ClientEventArgs> e )
CustomNetProtocol data = e.args.data.protocol;
short ID = data[0].value.netShort; // fetching the id data.
// Block irrelevant messages.
if( !ProtocolIsGameplay(ID) )
return;
if( ProtocolIsGameplay(ID) )
{
switch(ID)
{
case protocol_Gameplay_ObjectPickup: break; /** @todo TODO: implement */
@ -605,3 +603,13 @@ void GameState::DataRecieved( NetEvent<NetworkClient*, ClientEventArgs> e )
default: break;
}
}
else if( ProtocolIsGeneral(ID) )
{
switch( ID )
{
case protocol_General_Status: break; /** @todo TODO: implement */
case protocol_General_Text: break; /** @todo TODO: implement */
default: break;
}
}
}

View File

@ -141,9 +141,8 @@ void LobbyState::DataRecieved( NetEvent<NetworkClient*, ClientEventArgs> e )
short ID = data[0].value.netShort; // fetching the id data.
// Block irrelevant messages.
if( !ProtocolIsLobby(ID) )
return;
if( ProtocolIsLobby(ID) )
{
switch(ID)
{
case protocol_Lobby_Create: break; /** @todo TODO: implement */
@ -156,3 +155,13 @@ void LobbyState::DataRecieved( NetEvent<NetworkClient*, ClientEventArgs> e )
default: break;
}
}
else if( ProtocolIsGeneral(ID) )
{
switch( ID )
{
case protocol_General_Status: break; /** @todo TODO: implement */
case protocol_General_Text: break; /** @todo TODO: implement */
default: break;
}
}
}