GIT
/
REPO
/
FRED-BOY
Projects
/
d2df-sdl.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
416e7ea
)
Netmaster: Use DecodeIPV4 function
author
Stas'M <x86corez@gmail.com>
Fri, 18 May 2018 13:25:17 +0000
(16:25 +0300)
committer
Stas'M <x86corez@gmail.com>
Fri, 18 May 2018 13:25:45 +0000
(16:25 +0300)
src/game/g_netmaster.pas
patch
|
blob
|
history
diff --git
a/src/game/g_netmaster.pas
b/src/game/g_netmaster.pas
index 2e26b3a4911353ed68525980b511e80f984e2445..41478f1cb94b74b6c0c8ef0b4b780366cd35fc99 100644
(file)
--- 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;
DEADSOFTWARE 2012-2025