X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_net.pas;h=7e0f44d6eea0db1206c622dd7df555c4711a5ffe;hb=9a8aeed521e9954c69b5a57c970766d8ca157b4c;hp=2c88e6dacf6962d0505bd19f8e4484d55c0e4f74;hpb=e3e5f24a3b43361496a274067fcb6e45b0d86551;p=d2df-sdl.git diff --git a/src/game/g_net.pas b/src/game/g_net.pas index 2c88e6d..7e0f44d 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -22,7 +22,7 @@ uses 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; @@ -66,6 +66,12 @@ const BANLIST_FILENAME = 'banlist.txt'; NETDUMP_FILENAME = 'netdump'; + {$IFDEF FREEBSD} + NilThreadId = nil; + {$ELSE} + NilThreadId = 0; + {$ENDIF} + type TNetClient = record ID: Byte; @@ -149,7 +155,7 @@ var NetIGDService: TURLStr; {$ENDIF} - NetPortThread: TThreadID = 0; + NetPortThread: TThreadID = NilThreadId; NetDumpFile: TStream; @@ -319,10 +325,10 @@ begin NetMode := NET_NONE; - if NetPortThread <> 0 then + if NetPortThread <> NilThreadId then WaitForThreadTerminate(NetPortThread, 66666); - NetPortThread := 0; + NetPortThread := NilThreadId; g_Net_UnforwardPorts(); if NetDump then @@ -816,7 +822,8 @@ begin 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(IK_ESCAPE) or e_KeyPressed(VK_ESCAPE) or + e_KeyPressed(JOY0_JUMP) or e_KeyPressed(JOY1_JUMP) or e_KeyPressed(JOY2_JUMP) or e_KeyPressed(JOY3_JUMP) then OuterLoop := False; end; @@ -979,7 +986,8 @@ begin 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(IK_ESCAPE) or e_KeyPressed(VK_ESCAPE) or + e_KeyPressed(JOY0_JUMP) or e_KeyPressed(JOY1_JUMP) or e_KeyPressed(JOY2_JUMP) or e_KeyPressed(JOY3_JUMP) then break; end; Result := msgStream;