From 91a5ffe08943e28ecdcf8bb6752f88ff220a4cd9 Mon Sep 17 00:00:00 2001 From: Stas'M Date: Fri, 18 May 2018 16:25:17 +0300 Subject: [PATCH] Netmaster: Use DecodeIPV4 function --- src/game/g_netmaster.pas | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; -- 2.29.2