From: Stas'M Date: Fri, 18 May 2018 13:25:17 +0000 (+0300) Subject: Netmaster: Use DecodeIPV4 function X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=91a5ffe08943e28ecdcf8bb6752f88ff220a4cd9 Netmaster: Use DecodeIPV4 function --- diff --git a/src/game/g_netmaster.pas b/src/game/g_netmaster.pas index 2e26b3a..41478f1 100644 --- a/src/game/g_netmaster.pas +++ b/src/game/g_netmaster.pas @@ -130,16 +130,12 @@ var FromSL: Boolean; procedure ProcessLocal(); - var - IPBuf: Array[0..19] of Byte; begin I := Length(SL); SetLength(SL, I + 1); with SL[I] do begin - FillChar(IPBuf, Length(IPBuf), 0); - enet_address_get_host_ip(Addr(SvAddr.host), PChar(Addr(IPBuf)), Length(IPBuf)); - IP := PChar(Addr(IPBuf)); + IP := DecodeIPV4(SvAddr.host); Port := InMsg.ReadWord(); Ping := InMsg.ReadInt64(); Ping := GetTimerMS() - Ping;