X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_net.pas;h=0f1cf30a8c346c705b6e57280001f7a5b6c0b1b7;hb=c8d7811d45c2d34a7e297613e50570f253a0d8e9;hp=2e00600ae3ffea0f7dc03ddbe2655724718bba28;hpb=93f620df25ad634372657a64d609dcaf44e718bd;p=d2df-sdl.git diff --git a/src/game/g_net.pas b/src/game/g_net.pas index 2e00600..0f1cf30 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -21,7 +21,7 @@ uses e_log, e_msg, ENet, Classes, md5, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF} const - NET_PROTOCOL_VER = 182; + NET_PROTOCOL_VER = 183; NET_MAXCLIENTS = 24; NET_CHANS = 12; @@ -681,7 +681,7 @@ begin // packet type trans_omsg.Write(Byte(NTF_SERVER_MAP_INFO)); // map wad name - trans_omsg.Write(gGameSettings.WAD); + trans_omsg.Write(ExtractFileName(gGameSettings.WAD)); // map wad md5 trans_omsg.Write(md5); // map wad size @@ -1844,7 +1844,7 @@ end; function g_Net_Client_Update(): enet_size_t; begin Result := 0; - while (enet_host_service(NetHost, @NetEvent, 0) > 0) do + while (NetHost <> nil) and (enet_host_service(NetHost, @NetEvent, 0) > 0) do begin case NetEvent.kind of ENET_EVENT_TYPE_RECEIVE: