diff --git a/source/duke3d/src/net.cpp b/source/duke3d/src/net.cpp index 7a6d07e9a..afe1278cb 100644 --- a/source/duke3d/src/net.cpp +++ b/source/duke3d/src/net.cpp @@ -76,6 +76,37 @@ void faketimerhandler(void) } #endif +void Net_GetPackets(void) +{ + timerUpdate(); + MUSIC_Update(); + S_Cleanup(); + + G_HandleSpecialKeys(); + +#ifndef NETCODE_DISABLE + if (g_netDisconnect) + { + Net_Disconnect(); + g_netDisconnect = 0; + + if (g_gameQuit) + G_GameExit(" "); + + return; + } + + if (g_netServer) + { + Net_HandleClientPackets(); + } + else if (g_netClient) + { + Net_HandleServerPackets(); + } +#endif +} + // (the rest of the file) #ifndef NETCODE_DISABLE @@ -4764,35 +4795,6 @@ void Net_AddWorldToInitialSnapshot() Net_AddWorldToSnapshot(&g_mapStartState); } -void Net_GetPackets(void) -{ - timerUpdate(); - MUSIC_Update(); - S_Cleanup(); - - G_HandleSpecialKeys(); - - if (g_netDisconnect) - { - Net_Disconnect(); - g_netDisconnect = 0; - - if (g_gameQuit) - G_GameExit(" "); - - return; - } - - if (g_netServer) - { - Net_HandleClientPackets(); - } - else if (g_netClient) - { - Net_HandleServerPackets(); - } -} - void Net_SendClientInfo(void) { int32_t i, l; diff --git a/source/duke3d/src/net.h b/source/duke3d/src/net.h index 789e52cef..79c33214a 100644 --- a/source/duke3d/src/net.h +++ b/source/duke3d/src/net.h @@ -143,7 +143,7 @@ typedef struct netWall_s } netWall_t; -// sector struct with all 32 bit entries +// sector struct with all 32 bit entries typedef struct netSector_s { uint16_t netIndex; @@ -178,8 +178,8 @@ typedef struct netSector_s } netSector_t; const uint64_t cSnapshotMemUsage = NET_REVISIONS * ( - (sizeof(netWall_t) * MAXWALLS) - + (sizeof(netSector_t) * MAXSECTORS) + (sizeof(netWall_t) * MAXWALLS) + + (sizeof(netSector_t) * MAXSECTORS) + (sizeof(netactor_t) * MAXSPRITES) ); @@ -298,8 +298,6 @@ void Net_WaitForInitialSnapshot(); // note: don't include faketimerhandler in this -#define Net_GetPackets(...) ((void)0) - #define Net_Connect(...) ((void)0) #define Net_SendClientInfo(...) ((void)0)