mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 15:21:48 +00:00
NETCODE_DISABLE implementation tweaks. I think this is better.
git-svn-id: https://svn.eduke32.com/eduke32@6442 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
389c71e185
commit
bdf81027ec
3 changed files with 10 additions and 0 deletions
|
@ -365,6 +365,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifndef NETCODE_DISABLE
|
||||||
if (!Bstrcasecmp(c+1, "server"))
|
if (!Bstrcasecmp(c+1, "server"))
|
||||||
{
|
{
|
||||||
g_networkMode = NET_SERVER;
|
g_networkMode = NET_SERVER;
|
||||||
|
@ -400,6 +401,7 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!Bstrcasecmp(c+1, "name"))
|
if (!Bstrcasecmp(c+1, "name"))
|
||||||
{
|
{
|
||||||
if (argc > i+1)
|
if (argc > i+1)
|
||||||
|
|
|
@ -39,7 +39,9 @@ enet_uint16 g_netPort = 23513;
|
||||||
int32_t g_netDisconnect = 0;
|
int32_t g_netDisconnect = 0;
|
||||||
char g_netPassword[32];
|
char g_netPassword[32];
|
||||||
int32_t g_netPlayersWaiting = 0;
|
int32_t g_netPlayersWaiting = 0;
|
||||||
|
#ifndef NETCODE_DISABLE
|
||||||
int32_t g_networkMode = NET_CLIENT;
|
int32_t g_networkMode = NET_CLIENT;
|
||||||
|
#endif
|
||||||
int32_t g_netIndex = 2;
|
int32_t g_netIndex = 2;
|
||||||
newgame_t pendingnewgame;
|
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)
|
if (pbuf[5] == NET_DEDICATED_SERVER)
|
||||||
{
|
{
|
||||||
g_networkMode = NET_DEDICATED_CLIENT;
|
g_networkMode = NET_DEDICATED_CLIENT;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i=0; i<g_mostConcurrentPlayers-1; i++)
|
for (i=0; i<g_mostConcurrentPlayers-1; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,11 @@ extern char g_netPassword[32];
|
||||||
extern int32_t g_netDisconnect;
|
extern int32_t g_netDisconnect;
|
||||||
extern int32_t g_netPlayersWaiting;
|
extern int32_t g_netPlayersWaiting;
|
||||||
extern enet_uint16 g_netPort;
|
extern enet_uint16 g_netPort;
|
||||||
|
#ifndef NETCODE_DISABLE
|
||||||
extern int32_t g_networkMode;
|
extern int32_t g_networkMode;
|
||||||
|
#else
|
||||||
|
#define g_networkMode 0
|
||||||
|
#endif
|
||||||
extern int32_t g_netIndex;
|
extern int32_t g_netIndex;
|
||||||
extern int32_t lastsectupdate[MAXSECTORS];
|
extern int32_t lastsectupdate[MAXSECTORS];
|
||||||
extern int32_t lastupdate[MAXSPRITES];
|
extern int32_t lastupdate[MAXSPRITES];
|
||||||
|
|
Loading…
Reference in a new issue