Add indicator for IPv6-enabled servers

This commit is contained in:
Gustaf Alhäll 2023-11-26 21:30:54 +01:00
parent 10ca749991
commit 40f57de187
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD
3 changed files with 8 additions and 0 deletions

View file

@ -11254,6 +11254,8 @@ static void M_DrawConnectMenu(void)
V_DrawSmallString(currentMenu->x+202, S_LINEY(i)+8, globalflags, "\x85" "Mod");
if (serverlist[slindex].info.cheatsenabled)
V_DrawSmallString(currentMenu->x+222, S_LINEY(i)+8, globalflags, "\x83" "Cheats");
if (Net_IsNodeIPv6(serverlist[slindex].node))
V_DrawSmallString(currentMenu->x+252, S_LINEY(i)+8, globalflags, "\x84" "IPv6");
V_DrawSmallString(currentMenu->x, S_LINEY(i)+8, globalflags,
va("Ping: %u", (UINT32)LONG(serverlist[slindex].info.time)));

View file

@ -70,6 +70,7 @@ boolean HGetPacket(void);
void D_SetDoomcom(void);
boolean D_CheckNetGame(void);
void D_CloseConnection(void);
boolean Net_IsNodeIPv6(INT32 node);
void Net_UnAcknowledgePacket(INT32 node);
void Net_CloseConnection(INT32 node);
void Net_ConnectionTimeout(INT32 node);

View file

@ -1362,4 +1362,9 @@ boolean I_InitTcpNetwork(void)
return ret;
}
boolean Net_IsNodeIPv6(INT32 node)
{
return clientaddress[node].any.sa_family == AF_INET6;
}
#include "i_addrinfo.c"