Added kick logic to the server. Also typedefed.

This commit is contained in:
stiffly
2016-01-22 15:42:36 +01:00
parent 10c3b475bf
commit 08c476e9e3
6 changed files with 57 additions and 31 deletions
+9
View File
@@ -89,6 +89,9 @@ void Client::parseMessageType(Packet& packet)
break;
case MessageType::PlayerConnected:
parsePlayerConnected(packet);
case MessageType::Kick:
parseKick();
break;
default:
break;
}
@@ -120,6 +123,12 @@ void Client::parsePing()
send(packet);
}
void Client::parseKick()
{
LOG_WARNING("You have been kicked from the server.");
m_IsConnected = false;
}
// Fields with strings will not work right now
void Client::InterpolateFields(Packet& packet, const ComponentInfo& componentInfo, const EntityID& entityID, const std::string& componentType)
{