mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 20:15:35 -04:00
CPE two way ping replies should still be sent back when loading map
This commit is contained in:
parent
db7d148a44
commit
1fcdeabb98
@ -133,17 +133,19 @@ namespace ClassicalSharp.Network {
|
|||||||
void CoreTick() {
|
void CoreTick() {
|
||||||
CheckAsyncResources();
|
CheckAsyncResources();
|
||||||
wom.Tick();
|
wom.Tick();
|
||||||
if (!receivedFirstPosition) return;
|
|
||||||
|
|
||||||
LocalPlayer player = game.LocalPlayer;
|
if (receivedFirstPosition) {
|
||||||
classic.WritePosition(player.Position, player.HeadY, player.HeadX);
|
LocalPlayer player = game.LocalPlayer;
|
||||||
|
classic.WritePosition(player.Position, player.HeadY, player.HeadX);
|
||||||
|
}
|
||||||
|
|
||||||
pingTicks++;
|
pingTicks++;
|
||||||
|
|
||||||
if (pingTicks >= 20 && cpeData.twoWayPing) {
|
if (pingTicks >= 20 && cpeData.twoWayPing) {
|
||||||
cpe.WriteTwoWayPing(false, PingList.NextTwoWayPingData());
|
cpe.WriteTwoWayPing(false, PingList.NextTwoWayPingData());
|
||||||
pingTicks = 0;
|
pingTicks = 0;
|
||||||
}
|
}
|
||||||
SendPacket();
|
|
||||||
|
if (writer.index > 0) SendPacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Sets the incoming packet handler for the given packet id. </summary>
|
/// <summary> Sets the incoming packet handler for the given packet id. </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user