diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 07d9713477ed7da1251d54bfffac53b3cfd5d9b7..7c5de2a51f0418201e7e24678177a7e9e4ae8f14 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
NetGotEverything: Boolean = False;
NetGotKeys: Boolean = False;
NetGotEverything: Boolean = False;
NetGotKeys: Boolean = False;
+ NetDeafLevel: Integer = 0;
+
{$IFDEF USE_MINIUPNPC}
NetPortForwarded: Word = 0;
NetPongForwarded: Boolean = False;
{$IFDEF USE_MINIUPNPC}
NetPortForwarded: Word = 0;
NetPongForwarded: Boolean = False;
NetAddr.host := IPAddr;
NetAddr.port := Port;
NetAddr.host := IPAddr;
NetAddr.port := Port;
- if NetForwardPorts then NetPortThread := BeginThread(ForwardThread);
-
NetHost := enet_host_create(@NetAddr, NET_MAXCLIENTS, NET_CHANS, 0, 0);
if (NetHost = nil) then
NetHost := enet_host_create(@NetAddr, NET_MAXCLIENTS, NET_CHANS, 0, 0);
if (NetHost = nil) then
Exit;
end;
Exit;
end;
+ if NetForwardPorts then NetPortThread := BeginThread(ForwardThread);
+
NetPongSock := enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
if NetPongSock <> ENET_SOCKET_NULL then
begin
NetPongSock := enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
if NetPongSock <> ENET_SOCKET_NULL then
begin
Ping: array [0..9] of Byte;
NPl: Byte;
begin
Ping: array [0..9] of Byte;
NPl: Byte;
begin
- if NetPongSock = ENET_SOCKET_NULL then Exit;
+ if (NetPongSock = ENET_SOCKET_NULL) or (NetHost = nil) then Exit;
Buf.data := Addr(Ping[0]);
Buf.dataLength := 2+8;
Buf.data := Addr(Ping[0]);
Buf.dataLength := 2+8;
begin
Result := False;
begin
Result := False;
+ if NetHost = nil then
+ exit;
+
if NetPortForwarded = NetHost.address.port then
begin
Result := True;
if NetPortForwarded = NetHost.address.port then
begin
Result := True;
conRegVar('cl_interp', @NetInterpLevel, '', 'net player interpolation steps');
conRegVar('cl_last_ip', @NetClientIP, '', 'address of the last you have connected to');
conRegVar('cl_last_port', @NetClientPort, '', 'port of the last server you have connected to');
conRegVar('cl_interp', @NetInterpLevel, '', 'net player interpolation steps');
conRegVar('cl_last_ip', @NetClientIP, '', 'address of the last you have connected to');
conRegVar('cl_last_port', @NetClientPort, '', 'port of the last server you have connected to');
+ conRegVar('cl_deafen', @NetDeafLevel, '', 'filter server messages (0-3)');
conRegVar('sv_forwardports', @NetForwardPorts, '', 'forward server port using miniupnpc (requires server restart)');
conRegVar('sv_rcon', @NetAllowRCON, '', 'enable remote console');
conRegVar('sv_forwardports', @NetForwardPorts, '', 'forward server port using miniupnpc (requires server restart)');
conRegVar('sv_rcon', @NetAllowRCON, '', 'enable remote console');