diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index a2bda22ab..298e0010b 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -321,7 +321,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) if (pl->first == guid) continue; // If an invalid key makes it into the Players map, ignore it - else if (pl->first == RakNet::UNASSIGNED_RAKNET_GUID) continue; + else if (pl->first == RakNet::UNASSIGNED_CRABNET_GUID) continue; // if player not fully connected else if (pl->second == nullptr) continue; diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index f9c490a08..1e69f6542 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -239,9 +239,9 @@ int main(int argc, char *argv[]) switch (peer->Startup((unsigned) players, &sd, 1)) { - case RakNet::RAKNET_STARTED: + case RakNet::CRABNET_STARTED: break; - case RakNet::RAKNET_ALREADY_STARTED: + case RakNet::CRABNET_ALREADY_STARTED: throw runtime_error("Already started"); case RakNet::INVALID_SOCKET_DESCRIPTORS: throw runtime_error("Incorrect port or address"); diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index b5779cc21..646737482 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -200,7 +200,7 @@ Networking::Networking(): peer(RakNet::RakPeerInterface::GetInstance()), playerP RakNet::SocketDescriptor sd; sd.port=0; auto b = peer->Startup(1, &sd, 1); - RakAssert(b==RakNet::RAKNET_STARTED); + RakAssert(b==RakNet::CRABNET_STARTED); playerPacketController.SetStream(0, &bsOut); actorPacketController.SetStream(0, &bsOut); @@ -303,6 +303,13 @@ void Networking::connect(const std::string &ip, unsigned short port, std::vector queue = false; break; } + case ID_INCOMPATIBLE_PROTOCOL_VERSION: + { + errmsg = "Network protocol mismatch!\nMake sure your client is really on the same version\n" + "as the server you are trying to connect to."; + queue = false; + break; + } case ID_CONNECTION_REQUEST_ACCEPTED: { serverAddr = packet->systemAddress;