summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e38e7c0)
raw | patch | inline | side by side (parent: e38e7c0)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 12 Oct 2019 01:21:42 +0000 (04:21 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 12 Oct 2019 15:54:12 +0000 (18:54 +0300) |
src/game/g_nethandler.pas | patch | blob | history | |
src/game/g_netmsg.pas | patch | blob | history |
index d8b83e043afe46edb44e4a74740553d2575841d4..ebd9d1d87552720a3f1206f6d7ad14b4aa56a2b4 100644 (file)
NET_MSG_RCON_AUTH: MH_RECV_RCONPassword(S, NetMsg);
NET_MSG_RCON_CMD: MH_RECV_RCONCommand(S, NetMsg);
- NET_MSG_MAP_REQUEST: MH_RECV_MapRequest(S, NetMsg);
- NET_MSG_RES_REQUEST: MH_RECV_ResRequest(S, NetMsg);
+ //NET_MSG_MAP_REQUEST: MH_RECV_MapRequest(S, NetMsg);
+ //NET_MSG_RES_REQUEST: MH_RECV_ResRequest(S, NetMsg);
NET_MSG_VOTE_EVENT: MH_RECV_Vote(S, NetMsg);
end;
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 0483bea1651608dc407895e67f6125f568f932f1..d8f8970c8ba6e950e29ec82975c1c9b2e8df8e33 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
procedure MH_RECV_CheatRequest(C: pTNetClient; var M: TMsg);
procedure MH_RECV_RCONPassword(C: pTNetClient; var M: TMsg);
procedure MH_RECV_RCONCommand(C: pTNetClient; var M: TMsg);
-procedure MH_RECV_MapRequest(C: pTNetClient; var M: TMsg);
-procedure MH_RECV_ResRequest(C: pTNetClient; var M: TMsg);
+//procedure MH_RECV_MapRequest(C: pTNetClient; var M: TMsg);
+//procedure MH_RECV_ResRequest(C: pTNetClient; var M: TMsg);
procedure MH_RECV_Vote(C: pTNetClient; var M: TMsg);
// GAME
procedure MC_SEND_RCONCommand(Cmd: string);
procedure MC_SEND_Vote(Start: Boolean = False; Command: string = 'a');
// DOWNLOAD
-procedure MC_SEND_MapRequest();
-procedure MC_SEND_ResRequest(const resName: AnsiString);
+//procedure MC_SEND_MapRequest();
+//procedure MC_SEND_ResRequest(const resName: AnsiString);
type
Result := True;
end;
+{
procedure MC_SEND_MapRequest();
begin
NetOut.Write(Byte(NET_MSG_MAP_REQUEST));
e_WriteLog('NET: Received map request from ' +
DecodeIPV4(C^.Peer.address.host), TMsgType.Notify);
- (*
- omsg.Alloc(NET_BUFSIZE);
- try
- omsg.Clear();
- dfn := findDiskWad(MapsDir+gGameSettings.WAD);
- if (dfn = '') then dfn := '!wad_not_found!.wad'; //FIXME
- md5 := MD5File(dfn);
- st := openDiskFileRO(dfn);
- if not assigned(st) then exit; //wtf?!
- size := st.size;
- st.Free;
- // packet type
- omsg.Write(Byte({NTF_SERVER_MAP_INFO}NET_MSG_MAP_RESPONSE));
- // map wad name
- omsg.Write(gGameSettings.WAD);
- // map wad md5
- omsg.Write(md5);
- // map wad size
- omsg.Write(size);
- // number of external resources for map
- omsg.Write(LongInt(gExternalResources.Count));
- // external resource names
- for f := 0 to gExternalResources.Count-1 do
- begin
- omsg.Write(ExtractFileName(gExternalResources[f])); // GameDir+'/wads/'+ResList.Strings[i]
- end;
- // send packet
- pkt := enet_packet_create(omsg.Data, omsg.CurSize, ENET_PACKET_FLAG_RELIABLE);
- if not Assigned(pkt) then exit;
- peer := NetClients[C^.ID].Peer;
- if (enet_peer_send(Peer, NET_CHAN_DOWNLOAD_EX, pkt) <> 0) then exit;
- finally
- omsg.Free();
- end;
- *)
mapDataMsg := CreateMapDataMsg(MapsDir + gGameSettings.WAD, gExternalResources);
peer := NetClients[C^.ID].Peer;
g_Net_SendData(payload, peer, True, NET_CHAN_DOWNLOAD);
end;
end;
+}
end.