From cdfd51801a9a96afbc0722a0a9edd7e3ed469a16 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Sun, 16 Jul 2023 03:19:40 +1000 Subject: [PATCH] Net: Clean-up leftovers from using ENet sequencing channels maybe some other time, I hope --- src/game/g_net.pas | 106 ++++++++++++++---------------------------- src/game/g_netmsg.pas | 84 ++++++++++++++++----------------- 2 files changed, 78 insertions(+), 112 deletions(-) diff --git a/src/game/g_net.pas b/src/game/g_net.pas index 6d1be31..d97d4bd 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -22,22 +22,16 @@ uses const NET_PROTOCOL_VER = 188; - NET_MAXCLIENTS = 24; - NET_CHANS = 12; - - NET_CHAN_SERVICE = 0; - NET_CHAN_IMPORTANT = 1; - NET_CHAN_GAME = 2; - NET_CHAN_PLAYER = 3; - NET_CHAN_PLAYERPOS = 4; - NET_CHAN_MONSTER = 5; - NET_CHAN_MONSTERPOS = 6; - NET_CHAN_LARGEDATA = 7; - NET_CHAN_CHAT = 8; - NET_CHAN_DOWNLOAD = 9; - NET_CHAN_SHOTS = 10; - NET_CHAN_DOWNLOAD_EX = 11; + + // NOTE: We use different channels for unreliable and reliable packets because ENet seems to + // discard preceeding RELIABLE packets if a later UNRELIABLE (but not UNSEQUENCED) packet sent + // on the same channel has arrived earlier, which is useful for occasional full-state updates. + // However, we use a separate download channel to avoid being delayed by other reliable packets. + NET_CHAN_UNRELIABLE = 2; + NET_CHAN_RELIABLE = 1; + NET_CHAN_DOWNLOAD = 11; + NET_CHANNELS = 12; // TODO: Reduce to 3 and re-enumerate channels. Requires protocol increment. NET_NONE = 0; NET_SERVER = 1; @@ -207,23 +201,19 @@ procedure g_Net_Flush(); function g_Net_Host(IPAddr: LongWord; Port: enet_uint16; MaxClients: Cardinal = 16): Boolean; procedure g_Net_Host_Die(); -procedure g_Net_Host_Send(ID: Integer; Reliable: Boolean; Chan: Byte = NET_CHAN_GAME); +procedure g_Net_Host_Send(ID: Integer; Reliable: Boolean); procedure g_Net_Host_Update(); procedure g_Net_Host_Kick(ID: Integer; Reason: enet_uint32); function g_Net_Connect(IP: string; Port: enet_uint16): Boolean; procedure g_Net_Disconnect(Forced: Boolean = False); -procedure g_Net_Client_Send(Reliable: Boolean; Chan: Byte = NET_CHAN_GAME); +procedure g_Net_Client_Send(Reliable: Boolean); procedure g_Net_Client_Update(); function g_Net_Client_ByName(Name: string): pTNetClient; 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); -//function g_Net_Wait_Event(msgId: Word): TMemoryStream; -//function g_Net_Wait_FileInfo (var tf: TNetFileTransfer; asMap: Boolean; out resList: TStringList): Integer; - function IpToStr(IP: LongWord): string; function StrToIp(IPstr: string; var IP: LongWord): Boolean; @@ -388,7 +378,7 @@ begin if (m.CurSize < 1) then exit; pkt := enet_packet_create(m.Data, m.CurSize, ENET_PACKET_FLAG_RELIABLE); if not Assigned(pkt) then begin killClientByFT(nc); exit; end; - if (enet_peer_send(nc.Peer, NET_CHAN_DOWNLOAD_EX, pkt) <> 0) then begin killClientByFT(nc); exit; end; + if (enet_peer_send(nc.Peer, NET_CHAN_DOWNLOAD, pkt) <> 0) then begin killClientByFT(nc); exit; end; result := true; end; @@ -402,7 +392,7 @@ begin if (m.CurSize < 1) then exit; pkt := enet_packet_create(m.Data, m.CurSize, ENET_PACKET_FLAG_RELIABLE); if not Assigned(pkt) then exit; - if (enet_peer_send(NetPeer, NET_CHAN_DOWNLOAD_EX, pkt) <> 0) then exit; + if (enet_peer_send(NetPeer, NET_CHAN_DOWNLOAD, pkt) <> 0) then exit; result := true; end; @@ -815,7 +805,7 @@ begin ENET_EVENT_TYPE_RECEIVE: begin freePacket := true; - if (ev.channelID <> NET_CHAN_DOWNLOAD_EX) then + if (ev.channelID <> NET_CHAN_DOWNLOAD) then begin //e_LogWritefln('g_Net_Wait_MapInfo: skip message from non-transfer channel', []); freePacket := false; @@ -864,7 +854,7 @@ begin rc := msg.ReadLongInt(); if (rc < 0) or (rc > 1024) then begin - e_LogWritefln('g_Net_Wait_Event: invalid number of map external resources (%d)', [rc]); + e_LogWritefln('g_Net_Wait_MapInfo: invalid number of map external resources (%d)', [rc]); Result := -1; exit; end; @@ -898,7 +888,7 @@ begin end else begin - e_LogWritefln('g_Net_Wait_Event: invalid server packet type', []); + e_LogWritefln('g_Net_Wait_MapInfo: invalid server packet type', []); Result := -1; exit; end; @@ -997,9 +987,9 @@ begin ENET_EVENT_TYPE_RECEIVE: begin freePacket := true; - if (ev.channelID <> NET_CHAN_DOWNLOAD_EX) then + if (ev.channelID <> NET_CHAN_DOWNLOAD) then begin - //e_LogWriteln('g_Net_Wait_Event: skip message from non-transfer channel'); + //e_LogWriteln('g_Net_RequestResFileInfo: skip message from non-transfer channel'); freePacket := false; g_Net_Client_HandlePacket(ev.packet, g_Net_ClientLightMsgHandler); if (g_Res_received_map_start < 0) then begin result := -666; exit; end; @@ -1009,7 +999,7 @@ begin ett := getNewTimeoutEnd(); if (ev.packet.dataLength < 1) then begin - e_LogWriteln('g_Net_Wait_Event: invalid server packet (no data)'); + e_LogWriteln('g_Net_RequestResFileInfo: invalid server packet (no data)'); Result := -1; exit; end; @@ -1182,9 +1172,9 @@ begin ENET_EVENT_TYPE_RECEIVE: begin freePacket := true; - if (ev.channelID <> NET_CHAN_DOWNLOAD_EX) then + if (ev.channelID <> NET_CHAN_DOWNLOAD) then begin - //e_LogWritefln('g_Net_Wait_Event: skip message from non-transfer channel', []); + //e_LogWritefln('g_Net_ReceiveResourceFile: skip message from non-transfer channel', []); freePacket := false; g_Net_Client_HandlePacket(ev.packet, g_Net_ClientLightMsgHandler); if (g_Res_received_map_start < 0) then begin result := -666; exit; end; @@ -1391,7 +1381,7 @@ var I: Integer; begin F := 0; - Chan := NET_CHAN_GAME; + Chan := NET_CHAN_UNRELIABLE; if NetMode = NET_SERVER then for T := NET_UNRELIABLE to NET_RELIABLE do @@ -1408,7 +1398,7 @@ begin // next and last iteration is always RELIABLE F := LongWord(ENET_PACKET_FLAG_RELIABLE); - Chan := NET_CHAN_IMPORTANT; + Chan := NET_CHAN_RELIABLE; end else if NetMode = NET_CLIENT then for T := NET_UNRELIABLE to NET_RELIABLE do @@ -1422,7 +1412,7 @@ begin end; // next and last iteration is always RELIABLE F := LongWord(ENET_PACKET_FLAG_RELIABLE); - Chan := NET_CHAN_IMPORTANT; + Chan := NET_CHAN_RELIABLE; end; end; @@ -1511,7 +1501,7 @@ begin NetAddr.host := IPAddr; NetAddr.port := Port; - NetHost := enet_host_create(@NetAddr, NET_MAXCLIENTS, NET_CHANS, 0, 0); + NetHost := enet_host_create(@NetAddr, NET_MAXCLIENTS, NET_CHANNELS, 0, 0); if (NetHost = nil) then begin @@ -1592,14 +1582,13 @@ begin end; -procedure g_Net_Host_Send(ID: Integer; Reliable: Boolean; Chan: Byte = NET_CHAN_GAME); +procedure g_Net_Host_Send(ID: Integer; Reliable: Boolean); var T: Integer; begin - if (Reliable) then - T := NET_RELIABLE - else - T := NET_UNRELIABLE; + if Reliable + then T := NET_RELIABLE + else T := NET_UNRELIABLE; if (ID >= 0) then begin @@ -1849,7 +1838,7 @@ begin ENET_EVENT_TYPE_RECEIVE: begin //e_LogWritefln('RECEIVE: chan=%u', [NetEvent.channelID]); - if (NetEvent.channelID = NET_CHAN_DOWNLOAD_EX) then + if (NetEvent.channelID = NET_CHAN_DOWNLOAD) then begin ProcessDownloadExPacket(); end @@ -1935,14 +1924,13 @@ begin e_WriteLog('NET: Disconnected', TMsgType.Notify); end; -procedure g_Net_Client_Send(Reliable: Boolean; Chan: Byte = NET_CHAN_GAME); +procedure g_Net_Client_Send(Reliable: Boolean); var T: Integer; begin - if (Reliable) then - T := NET_RELIABLE - else - T := NET_UNRELIABLE; + if Reliable + then T := NET_RELIABLE + else T := NET_UNRELIABLE; // write size first NetBuf[T].Write(Integer(NetOut.CurSize)); @@ -2001,7 +1989,7 @@ begin NetInitDone := True; end; - NetHost := enet_host_create(nil, 1, NET_CHANS, 0, 0); + NetHost := enet_host_create(nil, 1, NET_CHANNELS, 0, 0); if (NetHost = nil) then begin @@ -2014,7 +2002,7 @@ begin enet_address_set_host(@NetAddr, PChar(Addr(IP[1]))); NetAddr.port := Port; - NetPeer := enet_host_connect(NetHost, @NetAddr, NET_CHANS, NET_PROTOCOL_VER); + NetPeer := enet_host_connect(NetHost, @NetAddr, NET_CHANNELS, NET_PROTOCOL_VER); if (NetPeer = nil) then begin @@ -2143,28 +2131,6 @@ begin end; end; -procedure g_Net_SendData(Data: AByte; peer: pENetPeer; Reliable: Boolean; Chan: Byte = NET_CHAN_DOWNLOAD); -var - P: pENetPacket; - F: enet_uint32; - dataLength: Cardinal; -begin - dataLength := Length(Data); - - if Reliable - then F := LongWord(ENET_PACKET_FLAG_RELIABLE) - else F := 0; - - P := enet_packet_create(@Data[0], dataLength, F); - if not Assigned(P) then exit; - - if peer <> nil - then enet_peer_send(peer, Chan, P) - else enet_host_broadcast(NetHost, Chan, P); - - enet_host_flush(NetHost); -end; - function g_Net_IsHostBanned(IP: LongWord; Perm: Boolean = False): Boolean; var I: Integer; diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 73c65e3..1eb3683 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -992,7 +992,7 @@ begin NetOut.Write(gGameSettings.Options); NetOut.Write(gTime); - g_Net_Host_Send(ID, True, NET_CHAN_SERVICE); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_Chat(Txt: string; Mode: Byte; ID: Integer = NET_EVERYONE); @@ -1014,7 +1014,7 @@ begin NetOut.Write(Byte(NET_MSG_CHAT)); NetOut.Write(Txt); NetOut.Write(Mode); - g_Net_Host_Send(gPlayers[i].FClientID, True, NET_CHAN_CHAT); + g_Net_Host_Send(gPlayers[i].FClientID, True); end; Team := ID; ID := NET_EVERYONE; @@ -1024,7 +1024,7 @@ begin NetOut.Write(Byte(NET_MSG_CHAT)); NetOut.Write(Txt); NetOut.Write(Mode); - g_Net_Host_Send(ID, True, NET_CHAN_CHAT); + g_Net_Host_Send(ID, True); end; if Mode = NET_CHAT_SYSTEM then @@ -1073,7 +1073,7 @@ begin NetOut.Write(Y); NetOut.Write(Ang); - g_Net_Host_Send(ID, False, NET_CHAN_GAME); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_Sound(X, Y: Integer; Name: string; Pos: Boolean = True; ID: Integer = NET_EVERYONE); @@ -1089,7 +1089,7 @@ begin else NetOut.Write(Byte(0)); - g_Net_Host_Send(ID, False, NET_CHAN_GAME); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_CreateShot(Proj: LongInt; ID: Integer = NET_EVERYONE); @@ -1107,7 +1107,7 @@ begin NetOut.Write(Shots[Proj].Obj.Vel.X); NetOut.Write(Shots[Proj].Obj.Vel.Y); - g_Net_Host_Send(ID, True, NET_CHAN_SHOTS); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_UpdateShot(Proj: LongInt; ID: Integer = NET_EVERYONE); @@ -1121,7 +1121,7 @@ begin NetOut.Write(Shots[Proj].Obj.Vel.X); NetOut.Write(Shots[Proj].Obj.Vel.Y); - g_Net_Host_Send(ID, False, NET_CHAN_SHOTS); + g_Net_Host_Send(ID, False); end; procedure MH_Send_DeleteShot(Proj: LongInt; X, Y: LongInt; Loud: Boolean = True; ID: Integer = NET_EVERYONE); @@ -1132,7 +1132,7 @@ begin NetOut.Write(X); NetOut.Write(Y); - g_Net_Host_Send(ID, True, NET_CHAN_SHOTS); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_GameStats(ID: Integer = NET_EVERYONE); @@ -1150,7 +1150,7 @@ begin NetOut.Write(gCoopSecretsFound); end; - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_CoopStats(ID: Integer = NET_EVERYONE); @@ -1179,7 +1179,7 @@ begin end else NetOut.Write(Byte(0)); - g_Net_Host_Send(ID, True, NET_CHAN_SERVICE); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_FlagEvent(EvType: Byte; Flag: Byte; PID: Word; Quiet: Boolean = False; ID: Integer = NET_EVERYONE); @@ -1197,7 +1197,7 @@ begin NetOut.Write(gFlags[Flag].Obj.Vel.Y); NetOut.Write(Byte(gFlags[Flag].Direction)); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_FlagPos(Flag: Byte; ID: Integer = NET_EVERYONE); @@ -1209,7 +1209,7 @@ begin NetOut.Write(gFlags[Flag].Obj.Vel.X); NetOut.Write(gFlags[Flag].Obj.Vel.Y); - g_Net_Host_Send(ID, False, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_GameSettings(ID: Integer = NET_EVERYONE); @@ -1221,7 +1221,7 @@ begin NetOut.Write(gGameSettings.MaxLives); NetOut.Write(gGameSettings.Options); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; // PLAYER (SEND) @@ -1243,7 +1243,7 @@ begin NetOut.Write(P.FColor.B); NetOut.Write(P.Team); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT) + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PlayerPos(Reliable: Boolean; PID: Word; ID: Integer = NET_EVERYONE); @@ -1288,7 +1288,7 @@ begin NetOut.Write(GameAccelY); end; - g_Net_Host_Send(ID, Reliable, NET_CHAN_PLAYERPOS); + g_Net_Host_Send(ID, Reliable); end; procedure MH_SEND_PlayerStats(PID: Word; ID: Integer = NET_EVERYONE); @@ -1346,7 +1346,7 @@ begin NetOut.Write(FSpawnInvul); end; - g_Net_Host_Send(ID, True, NET_CHAN_PLAYER); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PlayerDamage(PID: Word; Kind: Byte; Attacker, Value: Word; VX, VY: Integer; ID: Integer = NET_EVERYONE); @@ -1359,7 +1359,7 @@ begin NetOut.Write(VX); NetOut.Write(VY); - g_Net_Host_Send(ID, False, NET_CHAN_PLAYER); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_PlayerDeath(PID: Word; KillType, DeathType: Byte; Attacker: Word; ID: Integer = NET_EVERYONE); @@ -1370,7 +1370,7 @@ begin NetOut.Write(DeathType); NetOut.Write(Attacker); - g_Net_Host_Send(ID, True, NET_CHAN_PLAYER); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PlayerFire(PID: Word; Weapon: Byte; X, Y, AX, AY: Integer; ShotID: Integer = -1; ID: Integer = NET_EVERYONE); @@ -1384,7 +1384,7 @@ begin NetOut.Write(AY); NetOut.Write(ShotID); - g_Net_Host_Send(ID, True, NET_CHAN_SHOTS); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PlayerDelete(PID: Word; ID: Integer = NET_EVERYONE); @@ -1392,7 +1392,7 @@ begin NetOut.Write(Byte(NET_MSG_PLRDEL)); NetOut.Write(PID); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PlayerSettings(PID: Word; Mdl: string = ''; ID: Integer = NET_EVERYONE); @@ -1414,7 +1414,7 @@ begin NetOut.Write(Pl.FColor.B); NetOut.Write(Pl.Team); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; // ITEM (SEND) @@ -1439,7 +1439,7 @@ begin NetOut.Write(it.Obj.Vel.X); NetOut.Write(it.Obj.Vel.Y); - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_ItemDestroy(Quiet: Boolean; IID: Word; ID: Integer = NET_EVERYONE); @@ -1448,7 +1448,7 @@ begin NetOut.Write(IID); NetOut.Write(Byte(Quiet)); - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_ItemPos(IID: Word; ID: Integer = NET_EVERYONE); @@ -1464,7 +1464,7 @@ begin NetOut.Write(it.Obj.Vel.X); NetOut.Write(it.Obj.Vel.Y); - g_Net_Host_Send(ID, False, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, False); end; // PANEL @@ -1486,7 +1486,7 @@ begin NetOut.Write(AnimLoop); end; - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_PanelState(PGUID: Integer; ID: Integer = NET_EVERYONE); @@ -1520,7 +1520,7 @@ begin if TP.moveOnce then mpflags := mpflags or 2; NetOut.Write(Byte(mpflags)); - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; // TRIGGER @@ -1580,7 +1580,7 @@ begin NetOut.Write(Byte(GameDirection)); end; - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_MonsterPos(UID: Word; ID: Integer = NET_EVERYONE); @@ -1602,7 +1602,7 @@ begin NetOut.Write(Byte(GameDirection)); end; - g_Net_Host_Send(ID, False, NET_CHAN_MONSTERPOS); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_MonsterState(UID: Word; ForcedAnim: Byte = 255; ID: Integer = NET_EVERYONE); @@ -1629,7 +1629,7 @@ begin NetOut.Write(FFireTime); end; - g_Net_Host_Send(ID, True, NET_CHAN_MONSTER); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_MonsterShot(UID: Word; X, Y, VX, VY: Integer; ID: Integer = NET_EVERYONE); @@ -1641,7 +1641,7 @@ begin NetOut.Write(VX); NetOut.Write(VY); - g_Net_Host_Send(ID, True, NET_CHAN_MONSTER); + g_Net_Host_Send(ID, True); end; procedure MH_SEND_MonsterDelete(UID: Word; ID: Integer = NET_EVERYONE); @@ -1654,7 +1654,7 @@ begin NetOut.Write(Byte(NET_MSG_MDEL)); NetOut.Write(UID); - g_Net_Host_Send(ID, True, NET_CHAN_LARGEDATA); + g_Net_Host_Send(ID, True); end; // MISC @@ -1664,7 +1664,7 @@ begin NetOut.Write(Byte(NET_MSG_TIME_SYNC)); NetOut.Write(Time); - g_Net_Host_Send(ID, False, NET_CHAN_SERVICE); + g_Net_Host_Send(ID, False); end; procedure MH_SEND_VoteEvent(EvType: Byte; @@ -1679,7 +1679,7 @@ begin NetOut.Write(StrArg1); NetOut.Write(StrArg2); - g_Net_Host_Send(ID, True, NET_CHAN_IMPORTANT); + g_Net_Host_Send(ID, True); end; // CLIENT MESSAGES // @@ -3183,7 +3183,7 @@ begin NetOut.Write(gPlayer1Settings.SwitchToEmpty); NetOut.Write(gPlayer1Settings.SkipFist); - g_Net_Client_Send(True, NET_CHAN_SERVICE); + g_Net_Client_Send(True); end; procedure MC_SEND_Chat(Txt: string; Mode: Byte); @@ -3192,7 +3192,7 @@ begin NetOut.Write(Txt); NetOut.Write(Mode); - g_Net_Client_Send(True, NET_CHAN_CHAT); + g_Net_Client_Send(True); end; procedure MC_SEND_PlayerPos(); @@ -3306,7 +3306,7 @@ begin NetOut.Write(WeaponAct); NetOut.Write(WeaponSelect); //e_WriteLog(Format('S:ws=%d', [WeaponSelect]), MSG_WARNING); - g_Net_Client_Send(True, NET_CHAN_PLAYERPOS); + g_Net_Client_Send(True); //kBytePrev := kByte; //kDirPrev := gPlayer1.Direction; @@ -3317,7 +3317,7 @@ begin NetOut.Write(Byte(NET_MSG_VOTE_EVENT)); NetOut.Write(Byte(Start)); NetOut.Write(Command); - g_Net_Client_Send(True, NET_CHAN_IMPORTANT); + g_Net_Client_Send(True); end; procedure MC_SEND_PlayerSettings(); @@ -3336,14 +3336,14 @@ begin NetOut.Write(gPlayer1Settings.SwitchToEmpty); NetOut.Write(gPlayer1Settings.SkipFist); - g_Net_Client_Send(True, NET_CHAN_IMPORTANT); + g_Net_Client_Send(True); end; procedure MC_SEND_FullStateRequest(); begin NetOut.Write(Byte(NET_MSG_REQFST)); - g_Net_Client_Send(True, NET_CHAN_SERVICE); + g_Net_Client_Send(True); end; procedure MC_SEND_CheatRequest(Kind: Byte); @@ -3351,21 +3351,21 @@ begin NetOut.Write(Byte(NET_MSG_CHEAT)); NetOut.Write(Kind); - g_Net_Client_Send(True, NET_CHAN_IMPORTANT); + g_Net_Client_Send(True); end; procedure MC_SEND_RCONPassword(Password: string); begin NetOut.Write(Byte(NET_MSG_RCON_AUTH)); NetOut.Write(Password); - g_Net_Client_Send(True, NET_CHAN_SERVICE); + g_Net_Client_Send(True); end; procedure MC_SEND_RCONCommand(Cmd: string); begin NetOut.Write(Byte(NET_MSG_RCON_CMD)); NetOut.Write(Cmd); - g_Net_Client_Send(True, NET_CHAN_SERVICE); + g_Net_Client_Send(True); end; -- 2.29.2