- // don't send too often (cl_netfps)
- if (!important && host.realtime < cl.lastpackettime + packettime)
+
+ // don't send too often (cl_netfps), allowing a small margin for float error
+ // bones_was_here: accumulate realframetime to prevent low packet rates
+ // previously with cl_maxfps == cl_netfps it did not send every frame as
+ // host.realtime - cl.lastpackettime was often well below (or above) packettime
+ if (!important && cl.timesincepacket < packettime * 0.99999f)
+ {
+ cl.timesincepacket += cl.realframetime;