diff --git a/source/duke3d/src/cmdline.cpp b/source/duke3d/src/cmdline.cpp index f0cd18e3a..8f240f864 100644 --- a/source/duke3d/src/cmdline.cpp +++ b/source/duke3d/src/cmdline.cpp @@ -365,6 +365,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv) i++; continue; } +#ifndef NETCODE_DISABLE if (!Bstrcasecmp(c+1, "server")) { g_networkMode = NET_SERVER; @@ -400,6 +401,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv) i++; continue; } +#endif if (!Bstrcasecmp(c+1, "name")) { if (argc > i+1) diff --git a/source/duke3d/src/net.cpp b/source/duke3d/src/net.cpp index 365b5e851..832b743fc 100644 --- a/source/duke3d/src/net.cpp +++ b/source/duke3d/src/net.cpp @@ -39,7 +39,9 @@ enet_uint16 g_netPort = 23513; int32_t g_netDisconnect = 0; char g_netPassword[32]; int32_t g_netPlayersWaiting = 0; +#ifndef NETCODE_DISABLE int32_t g_networkMode = NET_CLIENT; +#endif int32_t g_netIndex = 2; newgame_t pendingnewgame; @@ -823,10 +825,12 @@ void Net_ReceiveNewPlayer(uint8_t *pbuf, int32_t packbufleng) } } +#ifndef NETCODE_DISABLE if (pbuf[5] == NET_DEDICATED_SERVER) { g_networkMode = NET_DEDICATED_CLIENT; } +#endif for (i=0; i