From: bones_was_here Date: Mon, 5 Apr 2021 15:23:29 +0000 (+1000) Subject: Change all the WriteShort bounds from max 65535 to 32767 X-Git-Tag: xonotic-v0.8.5~405^2~19^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7bffd000c18d2915bc3c127cf060016400274cb8;p=xonotic%2Fxonotic-data.pk3dir.git Change all the WriteShort bounds from max 65535 to 32767 --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 8b1314663..110ccdc86 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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 } } diff --git a/qcsrc/common/mapobjects/func/rainsnow.qc b/qcsrc/common/mapobjects/func/rainsnow.qc index 4f4d4d0ac..de49f1e36 100644 --- a/qcsrc/common/mapobjects/func/rainsnow.qc +++ b/qcsrc/common/mapobjects/func/rainsnow.qc @@ -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; } diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index 4d4ccc8dd..85a8ab843 100644 --- a/qcsrc/common/mapobjects/models.qc +++ b/qcsrc/common/mapobjects/models.qc @@ -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);