Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Aug 2, 2024
1 parent 9e36a8e commit ed63101
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions LiteNetLib/NetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private struct IncomingData
/// Used with <see cref="SimulateLatency"/> and <see cref="SimulatePacketLoss"/> to tag packets that
/// need to be dropped. Only relevant when <c>DEBUG</c> is defined.
/// </summary>
private bool dropPacket;
private bool _dropPacket;

//config section
/// <summary>
Expand Down Expand Up @@ -803,10 +803,10 @@ private void OnMessageReceived(NetPacket packet, IPEndPoint remoteEndPoint)
return;
}

dropPacket = false;
_dropPacket = false;
HandleSimulateLatency(packet, remoteEndPoint);
HandleSimulatePacketLoss();
if (dropPacket)
if (_dropPacket)
{
return;
}
Expand Down Expand Up @@ -836,7 +836,7 @@ private void HandleSimulateLatency(NetPacket packet, IPEndPoint remoteEndPoint)
});
}
// hold packet
dropPacket = true;
_dropPacket = true;
}
}

Expand All @@ -845,7 +845,7 @@ private void HandleSimulatePacketLoss()
{
if (SimulatePacketLoss && _randomGenerator.NextDouble() * 100 < SimulationPacketLossChance)
{
dropPacket = true;
_dropPacket = true;
}
}

Expand Down

0 comments on commit ed63101

Please sign in to comment.