diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 2c88e6dacf6962d0505bd19f8e4484d55c0e4f74..953b430a5590cae3f9ef31e5351f0ef96d372eff 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
e_log, e_msg, ENet, Classes, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF}
const
e_log, e_msg, ENet, Classes, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF}
const
- NET_PROTOCOL_VER = 174;
+ NET_PROTOCOL_VER = 179;
NET_MAXCLIENTS = 24;
NET_CHANS = 11;
NET_MAXCLIENTS = 24;
NET_CHANS = 11;
BANLIST_FILENAME = 'banlist.txt';
NETDUMP_FILENAME = 'netdump';
BANLIST_FILENAME = 'banlist.txt';
NETDUMP_FILENAME = 'netdump';
+ {$IFDEF FREEBSD}
+ NilThreadId = nil;
+ {$ELSE}
+ NilThreadId = 0;
+ {$ENDIF}
+
type
TNetClient = record
ID: Byte;
type
TNetClient = record
ID: Byte;
NetIGDService: TURLStr;
{$ENDIF}
NetIGDService: TURLStr;
{$ENDIF}
- NetPortThread: TThreadID = 0;
+ NetPortThread: TThreadID = NilThreadId;
NetDumpFile: TStream;
NetDumpFile: TStream;
NetMode := NET_NONE;
NetMode := NET_NONE;
- if NetPortThread <> 0 then
+ if NetPortThread <> NilThreadId then
WaitForThreadTerminate(NetPortThread, 66666);
WaitForThreadTerminate(NetPortThread, 66666);
- NetPortThread := 0;
+ NetPortThread := NilThreadId;
g_Net_UnforwardPorts();
if NetDump then
g_Net_UnforwardPorts();
if NetDump then
ProcessLoading(true);
ProcessLoading(true);
- if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) or e_KeyPressed(VK_ESCAPE) then
+ if e_KeyPressed(IK_SPACE) or e_KeyPressed(VK_ESCAPE) then
OuterLoop := False;
end;
OuterLoop := False;
end;
ProcessLoading(true);
ProcessLoading(true);
- if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) or e_KeyPressed(VK_ESCAPE) then
+ if e_KeyPressed(IK_SPACE) or e_KeyPressed(VK_ESCAPE) then
break;
end;
Result := msgStream;
break;
end;
Result := msgStream;