]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Round scoreboard pings instead of implicitly flooring
authorbones_was_here <bones_was_here@xa.org.au>
Mon, 5 Apr 2021 15:33:52 +0000 (01:33 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Mon, 5 Apr 2021 15:33:52 +0000 (01:33 +1000)
qcsrc/server/world.qc

index bffb7dbd59f40d30cb682dcbd811ac543a709646..25c2cfb18ed53bb48ac2f3aad99f407be21f4359 100644 (file)
@@ -69,7 +69,7 @@ void PingPLReport_Think(entity this)
        {
                WriteHeader(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
                WriteByte(MSG_BROADCAST, this.cnt);
-               WriteShort(MSG_BROADCAST, bound(1, CS(e).ping, 32767));
+               WriteShort(MSG_BROADCAST, bound(1, rint(CS(e).ping), 32767));
                WriteByte(MSG_BROADCAST, min(ceil(CS(e).ping_packetloss * 255), 255));
                WriteByte(MSG_BROADCAST, min(ceil(CS(e).ping_movementloss * 255), 255));