Added General Protocol to DataRecieved overloads
This commit is contained in:
parent
6bf7bc898e
commit
fdb7a7e1b6
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue