]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Change all the WriteShort bounds from max 65535 to 32767
authorbones_was_here <bones_was_here@xa.org.au>
Mon, 5 Apr 2021 15:23:29 +0000 (01:23 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Mon, 5 Apr 2021 15:23:29 +0000 (01:23 +1000)
qcsrc/client/view.qc
qcsrc/common/mapobjects/func/rainsnow.qc
qcsrc/common/mapobjects/models.qc

index 8b13146633c81e10c3b42712f0ecf3cb13eb22b3..110ccdc8678d6a7ff729cf8d938da365a71890c6 100644 (file)
@@ -401,7 +401,7 @@ void fpscounter_update()
 
                int channel = MSG_C2S;
                WriteHeader(channel, fpsreport);
-               WriteShort(channel, bound(0, rint(fps), 65535)); // prevent insane fps values
+               WriteShort(channel, bound(0, rint(fps), 32767)); // prevent insane fps values
        }
 }
 
index 4f4d4d0aca59349bd04975b75b514c4501e3c7c4..de49f1e367c508327cc1363e8a57b9ec9f1a61e6 100644 (file)
@@ -13,7 +13,7 @@ bool rainsnow_SendEntity(entity this, entity to, float sf)
        WriteShort(MSG_ENTITY, compressShortVector(this.dest));
        WriteShort(MSG_ENTITY, this.count);
        WriteByte(MSG_ENTITY, this.cnt);
-       WriteShort(MSG_ENTITY, bound(0, this.fade_end, 65535));
+       WriteShort(MSG_ENTITY, bound(0, this.fade_end, 32767));
        return true;
 }
 
index 4d4ccc8dd2821b5ef60b33e4f62be4cfee56952d..85a8ab843620a151c774747bb3fd7001b0ff5386 100644 (file)
@@ -116,9 +116,9 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
                if(sf & 0x80)
                {
                        WriteShort(MSG_ENTITY, this.lodmodelindex0);
-                       WriteShort(MSG_ENTITY, bound(0, this.loddistance1, 65535));
+                       WriteShort(MSG_ENTITY, bound(0, this.loddistance1, 32767));
                        WriteShort(MSG_ENTITY, this.lodmodelindex1);
-                       WriteShort(MSG_ENTITY, bound(0, this.loddistance2, 65535));
+                       WriteShort(MSG_ENTITY, bound(0, this.loddistance2, 32767));
                        WriteShort(MSG_ENTITY, this.lodmodelindex2);
                }
                else
@@ -140,8 +140,8 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
                        WriteVector(MSG_ENTITY, this.movedir);
                        WriteByte(MSG_ENTITY, floor(this.lip * 255));
                }
-               WriteShort(MSG_ENTITY, bound(0, this.fade_start, 65535));
-               WriteShort(MSG_ENTITY, bound(0, this.fade_end, 65535));
+               WriteShort(MSG_ENTITY, bound(0, this.fade_start, 32767));
+               WriteShort(MSG_ENTITY, bound(0, this.fade_end, 32767));
                WriteByte(MSG_ENTITY, floor(this.alpha_max * 256));
                WriteByte(MSG_ENTITY, floor(this.alpha_min * 256));
                WriteByte(MSG_ENTITY, this.inactive);