- netcode cleanup.

This moves all parts in the Duke/Redneck modules that access ENet into net.cpp/network.cpp and changes global ENet structs to use C++ notation instead of typedefs so that anonymous definitions for them can be added where needed.
These changes are done to avoid including enet.h globally which is a major issue because this file does not work without including windows.h, making it extremely dirty.
This commit is contained in:
Christoph Oelckers 2020-02-03 21:06:03 +01:00
parent 1cb182be2f
commit 4350a4dd31
11 changed files with 310 additions and 276 deletions

View file

@ -618,11 +618,9 @@ FString GameInterface::statFPS()
}
// lag meter
if (g_netClientPeer)
{
output.AppendFormat("%d +- %d ms\n", (g_netClientPeer->lastRoundTripTime + g_netClientPeer->roundTripTime)/2,
(g_netClientPeer->lastRoundTripTimeVariance + g_netClientPeer->roundTripTimeVariance) / 2);
}
#ifndef NETCODE_DISABLE
Net_PrintLag(output);
#endif
}
if (cumulativeFrameDelay >= 1000.0)