summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 331297e)
raw | patch | inline | side by side (parent: 331297e)
author | Stas'M <x86corez@gmail.com> | |
Fri, 18 May 2018 19:33:46 +0000 (22:33 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Fri, 18 May 2018 20:32:18 +0000 (23:32 +0300) |
src/game/g_net.pas | patch | blob | history | |
src/game/g_netmsg.pas | patch | blob | history |
diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index fc5287a4dacc8708686611304a0a76afaa10706c..2c88e6dacf6962d0505bd19f8e4484d55c0e4f74 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
function g_Net_Client_ByPlayer(PID: Word): pTNetClient;
function g_Net_ClientName_ByID(ID: Integer): string;
-procedure g_Net_SendData(Data:AByte; peer: pENetPeer; Reliable: Boolean; Chan: Byte = NET_CHAN_DOWNLOAD);
+procedure g_Net_SendData(Data: AByte; peer: pENetPeer; Reliable: Boolean; Chan: Byte = NET_CHAN_DOWNLOAD);
function g_Net_Wait_Event(msgId: Word): TMemoryStream;
function IpToStr(IP: LongWord): string;
end;
end;
-procedure g_Net_SendData(Data:AByte; peer: pENetPeer; Reliable: Boolean; Chan: Byte = NET_CHAN_DOWNLOAD);
+procedure g_Net_SendData(Data: AByte; peer: pENetPeer; Reliable: Boolean; Chan: Byte = NET_CHAN_DOWNLOAD);
var
P: pENetPacket;
F: enet_uint32;
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index f17c0ed40a2c1c4742b0cea5499117a52abc7d1c..a7ff31a9639fe68fdf2efdae7e308b54a1683a5d 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
mapDataMsg: TMapDataMsg;
begin
e_WriteLog('NET: Received map request from ' +
- DecodeIPV4(C.Peer.address.host), TMsgType.Notify);
+ DecodeIPV4(C^.Peer.address.host), TMsgType.Notify);
mapDataMsg := CreateMapDataMsg(MapsDir + gGameSettings.WAD, gExternalResources);
- peer := NetClients[C.ID].Peer;
+ peer := NetClients[C^.ID].Peer;
MapDataMsgToBytes(payload, mapDataMsg);
g_Net_SendData(payload, peer, True, NET_CHAN_DOWNLOAD);
begin
FileName := ExtractFileName(M.ReadString());
e_WriteLog('NET: Received res request: ' + FileName +
- ' from ' + DecodeIPV4(C.Peer.address.host), TMsgType.Notify);
+ ' from ' + DecodeIPV4(C^.Peer.address.host), TMsgType.Notify);
if not IsValidFilePath(FileName) then
begin
exit;
end;
- peer := NetClients[C.ID].Peer;
+ peer := NetClients[C^.ID].Peer;
if gExternalResources.IndexOf(FileName) > -1 then
begin