[General] Switch RakNet enums to CrabNet enums

CrabNet is TES3MP's fork of RakNet that has deviated too far from RakNet to still be compatible with it.
pull/450/head
David Cernat 7 years ago
parent d7e29f1f61
commit 29be79e852

@ -292,7 +292,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;

@ -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");

@ -203,7 +203,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);

Loading…
Cancel
Save