summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ed3829)
raw | patch | inline | side by side (parent: 1ed3829)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 21 Mar 2022 16:46:56 +0000 (19:46 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 21 Mar 2022 16:46:56 +0000 (19:46 +0300) |
src/game/g_net.pas | patch | blob | history |
diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 54b06bf579020e5d0882bbe5b2e7946d710ce1c5..e7cd455d0f586b0763a1b8e5b933eb367e99e069 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
g_Player_Remove(TP.UID);
end;
+ if (TC^.Peer^.data <> nil) then
+ begin
+ FreeMemory(TC^.Peer^.data);
+ TC^.Peer^.data := nil;
+ end;
+
if (Force) then
enet_peer_reset(TC^.Peer);
TC^.NetOut[NET_UNRELIABLE].Free();
TC^.NetOut[NET_RELIABLE].Free();
- if (NetEvent.peer^.data <> nil) then
- begin
- FreeMemory(NetEvent.peer^.data);
- NetEvent.peer^.data := nil;
- end;
-
g_Console_Add(_lc[I_NET_MSG] + Format(_lc[I_NET_MSG_HOST_DISC], [ID]));
Dec(NetClientCount);