From 9b070704b06cad5848aa275be81f1f70eb6f36e0 Mon Sep 17 00:00:00 2001 From: Sour Date: Fri, 29 Jun 2018 00:08:48 -0400 Subject: [PATCH] Netplay: Fixed client input data being ignored by server --- Core/GameServerConnection.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/GameServerConnection.cpp b/Core/GameServerConnection.cpp index 8c2f70b0..ac7558e0 100644 --- a/Core/GameServerConnection.cpp +++ b/Core/GameServerConnection.cpp @@ -142,15 +142,17 @@ void GameServerConnection::ProcessMessage(NetMessage* message) break; case MessageType::InputData: - if(_handshakeCompleted) { - break; + if(!_handshakeCompleted) { + SendForceDisconnectMessage("Handshake has not been completed - invalid packet"); + return; } PushState(((InputDataMessage*)message)->GetInputState()); break; case MessageType::SelectController: - if(_handshakeCompleted) { - break; + if(!_handshakeCompleted) { + SendForceDisconnectMessage("Handshake has not been completed - invalid packet"); + return; } SelectControllerPort(((SelectControllerMessage*)message)->GetPortNumber()); break;