Permalink
Browse files

CPE two way ping replies should still be sent back when loading map

  • Loading branch information...
UnknownShadow200 committed Dec 4, 2017
1 parent db7d148 commit 1fcdeabb98643c8a37594753ea731c8ae25dac63
Showing with 8 additions and 6 deletions.
  1. +8 −6 ClassicalSharp/Network/NetworkProcessor.cs
@@ -132,18 +132,20 @@ public partial class NetworkProcessor : IServerConnection {
void CoreTick() {
CheckAsyncResources();
wom.Tick();
if (!receivedFirstPosition) return;
wom.Tick();
LocalPlayer player = game.LocalPlayer;
classic.WritePosition(player.Position, player.HeadY, player.HeadX);
pingTicks++;
if (receivedFirstPosition) {
LocalPlayer player = game.LocalPlayer;
classic.WritePosition(player.Position, player.HeadY, player.HeadX);
}
pingTicks++;
if (pingTicks >= 20 && cpeData.twoWayPing) {
cpe.WriteTwoWayPing(false, PingList.NextTwoWayPingData());
pingTicks = 0;
}
SendPacket();
if (writer.index > 0) SendPacket();
}
/// <summary> Sets the incoming packet handler for the given packet id. </summary>

0 comments on commit 1fcdeab

Please sign in to comment.