From 8447e3392dd869f62fa227337f8a4bba1a0bad8f Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 15 Dec 2018 22:33:15 +0000 Subject: [PATCH] Fix NETCODE_DISABLED builds. We should probably rename Net_GetPackets() to something else, because it does other required things. git-svn-id: https://svn.eduke32.com/eduke32@7295 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/net.cpp | 60 ++++++++++++++++++++------------------- source/duke3d/src/net.h | 8 ++---- 2 files changed, 34 insertions(+), 34 deletions(-) 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)