{
WriteHeader(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
WriteByte(MSG_BROADCAST, this.cnt);
- WriteShort(MSG_BROADCAST, max(1, e.ping));
- WriteByte(MSG_BROADCAST, ceil(e.ping_packetloss * 255));
- WriteByte(MSG_BROADCAST, ceil(e.ping_movementloss * 255));
+ WriteShort(MSG_BROADCAST, bound(1, e.ping, 65535));
+ WriteByte(MSG_BROADCAST, min(ceil(e.ping_packetloss * 255), 255));
+ WriteByte(MSG_BROADCAST, min(ceil(e.ping_movementloss * 255), 255));
// record latency times for clients throughout the match so we can report it to playerstats
if(time > (e.latency_time + LATENCY_THINKRATE))