clamp RTT variance a bit more loosely for throttle

This commit is contained in:
Lee Salzman 2020-09-05 20:29:58 -04:00
parent 65dc0f74d8
commit b63fd5256a

View file

@ -896,7 +896,7 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer *
peer -> lastRoundTripTime = peer -> lowestRoundTripTime; peer -> lastRoundTripTime = peer -> lowestRoundTripTime;
peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 15) / 16); peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 15) / 16);
peer -> lowestRoundTripTime = roundTripTime; peer -> lowestRoundTripTime = roundTripTime;
peer -> highestRoundTripTimeVariance = ENET_MAX (roundTripTimeVariance, 2); peer -> highestRoundTripTimeVariance = ENET_MAX (roundTripTimeVariance, 3);
peer -> packetThrottleEpoch = host -> serviceTime; peer -> packetThrottleEpoch = host -> serviceTime;
} }