bunch of stuff
This commit is contained in:
parent
e37dd606ba
commit
a6f740e1f8
|
@ -314,6 +314,13 @@ void GameState::ReadKeyInput()
|
|||
|
||||
void GameState::DataRecieved( NetEvent<NetworkClient*, NetworkClient::ClientEventArgs> e )
|
||||
{
|
||||
if( e.args.type == NetworkClient::ClientEventArgs::EventType_ProtocolFailedToSend )
|
||||
{ // TODO: Reconnect
|
||||
const char *breakpoint = "temp trap";
|
||||
this->privData->nwClient->Disconnect();
|
||||
this->ChangeState( GameClientState::ClientState_Main );
|
||||
}
|
||||
|
||||
CustomNetProtocol data = e.args.data.protocol;
|
||||
short ID = data[0].value.netShort; // fetching the id data.
|
||||
|
||||
|
|
|
@ -133,6 +133,16 @@ void LanMenuState::ChangeState( ClientState next )
|
|||
this->privData->nextState = next;
|
||||
}
|
||||
|
||||
void LanMenuState::DataRecieved( NetEvent<NetworkClient*, NetworkClient::ClientEventArgs> e )
|
||||
{
|
||||
if( e.args.type == NetworkClient::ClientEventArgs::EventType_ProtocolFailedToSend )
|
||||
{ // TODO: Reconnect
|
||||
const char *breakpoint = "temp trap";
|
||||
this->privData->nwClient->Disconnect();
|
||||
this->ChangeState( GameClientState::ClientState_Same );
|
||||
}
|
||||
}
|
||||
|
||||
void OnButtonInteract_Connect( Oyster::Event::ButtonEvent<LanMenuState*>& e )
|
||||
{
|
||||
switch( e.state )
|
||||
|
|
|
@ -21,6 +21,8 @@ namespace DanBias
|
|||
virtual bool Release();
|
||||
void ChangeState( ClientState next );
|
||||
|
||||
void DataRecieved( ::Oyster::Network::NetEvent<::Oyster::Network::NetworkClient*, ::Oyster::Network::NetworkClient::ClientEventArgs> e );
|
||||
|
||||
private:
|
||||
struct MyData;
|
||||
::Utility::DynamicMemory::UniquePointer<MyData> privData;
|
||||
|
|
Loading…
Reference in New Issue