From: Rudolf Polzer Date: Sun, 24 Nov 2013 08:44:45 +0000 (+0100) Subject: Fix "scale" networking. Sorry for that. X-Git-Tag: xonotic-v0.8.0~255 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=149779f11681a2b674dfe5fab5adbfd9a2b89cb0;p=xonotic%2Fxonotic-data.pk3dir.git Fix "scale" networking. Sorry for that. --- diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index 141bc673f..83178bac5 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -49,7 +49,7 @@ CSQCMODEL_PROPERTY(512, float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \ CSQCMODEL_PROPERTY(1024, float, ReadAngle, WriteAngle, v_angle_x) \ CSQCMODEL_ENDIF \ - CSQCMODEL_PROPERTY_SCALED(4096, float, ReadByte, WriteByte, scale, 16, 0, 99999999) + CSQCMODEL_PROPERTY_SCALED(4096, float, ReadByte, WriteByte, scale, 16, 1, 256) // TODO get rid of colormod/glowmod here, find good solution for nex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody // add hook function calls here diff --git a/qcsrc/csqcmodellib/sv_model.qc b/qcsrc/csqcmodellib/sv_model.qc index 1baad7b98..e0098b487 100644 --- a/qcsrc/csqcmodellib/sv_model.qc +++ b/qcsrc/csqcmodellib/sv_model.qc @@ -100,7 +100,7 @@ void CSQCModel_CheckUpdate() } #define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) \ { \ - t tmp = bound(mi, s * self.f, ma) - mi; \ + t tmp = rint(bound(mi, s * self.f, ma) - mi); \ if(tmp != self.csqcmodel_##f) \ { \ self.csqcmodel_##f = tmp; \