mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[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.
This commit is contained in:
parent
d7e29f1f61
commit
29be79e852
3 changed files with 4 additions and 4 deletions
|
@ -292,7 +292,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
|
||||||
if (pl->first == guid) continue;
|
if (pl->first == guid) continue;
|
||||||
|
|
||||||
// If an invalid key makes it into the Players map, ignore it
|
// 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
|
// if player not fully connected
|
||||||
else if (pl->second == nullptr) continue;
|
else if (pl->second == nullptr) continue;
|
||||||
|
|
|
@ -239,9 +239,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
switch (peer->Startup((unsigned) players, &sd, 1))
|
switch (peer->Startup((unsigned) players, &sd, 1))
|
||||||
{
|
{
|
||||||
case RakNet::RAKNET_STARTED:
|
case RakNet::CRABNET_STARTED:
|
||||||
break;
|
break;
|
||||||
case RakNet::RAKNET_ALREADY_STARTED:
|
case RakNet::CRABNET_ALREADY_STARTED:
|
||||||
throw runtime_error("Already started");
|
throw runtime_error("Already started");
|
||||||
case RakNet::INVALID_SOCKET_DESCRIPTORS:
|
case RakNet::INVALID_SOCKET_DESCRIPTORS:
|
||||||
throw runtime_error("Incorrect port or address");
|
throw runtime_error("Incorrect port or address");
|
||||||
|
|
|
@ -203,7 +203,7 @@ Networking::Networking(): peer(RakNet::RakPeerInterface::GetInstance()), playerP
|
||||||
RakNet::SocketDescriptor sd;
|
RakNet::SocketDescriptor sd;
|
||||||
sd.port=0;
|
sd.port=0;
|
||||||
auto b = peer->Startup(1, &sd, 1);
|
auto b = peer->Startup(1, &sd, 1);
|
||||||
RakAssert(b==RakNet::RAKNET_STARTED);
|
RakAssert(b==RakNet::CRABNET_STARTED);
|
||||||
|
|
||||||
playerPacketController.SetStream(0, &bsOut);
|
playerPacketController.SetStream(0, &bsOut);
|
||||||
actorPacketController.SetStream(0, &bsOut);
|
actorPacketController.SetStream(0, &bsOut);
|
||||||
|
|
Loading…
Reference in a new issue