From 8fdd9fdbead9da51719657ba98fab3ad9c83903b Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sat, 12 Oct 2019 04:21:42 +0300 Subject: [PATCH] net: commented out old-style resource downloading handlers --- src/game/g_nethandler.pas | 4 ++-- src/game/g_netmsg.pas | 45 ++++++--------------------------------- 2 files changed, 8 insertions(+), 41 deletions(-) diff --git a/src/game/g_nethandler.pas b/src/game/g_nethandler.pas index d8b83e0..ebd9d1d 100644 --- a/src/game/g_nethandler.pas +++ b/src/game/g_nethandler.pas @@ -178,8 +178,8 @@ begin 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 0483bea..d8f8970 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -163,8 +163,8 @@ procedure MH_RECV_PlayerSettings(C: pTNetClient; var M: TMsg); 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 @@ -265,8 +265,8 @@ procedure MC_SEND_RCONPassword(Password: string); 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 @@ -3130,6 +3130,7 @@ begin Result := True; end; +{ procedure MC_SEND_MapRequest(); begin NetOut.Write(Byte(NET_MSG_MAP_REQUEST)); @@ -3152,41 +3153,6 @@ begin 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; @@ -3227,6 +3193,7 @@ begin g_Net_SendData(payload, peer, True, NET_CHAN_DOWNLOAD); end; end; +} end. -- 2.29.2