]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "scale" networking. Sorry for that.
authorRudolf Polzer <divverent@xonotic.org>
Sun, 24 Nov 2013 08:44:45 +0000 (09:44 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 24 Nov 2013 08:44:45 +0000 (09:44 +0100)
qcsrc/common/csqcmodel_settings.qh
qcsrc/csqcmodellib/sv_model.qc

index 141bc673f7fd27b07b857ebc2072c0c4630b7b72..83178bac592f1648207012d840f0520c928a2216 100644 (file)
@@ -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
index 1baad7b98d31e5790ff68a570c3b4e079d960470..e0098b4876ea202ec2fdb12f50f9b0977084b50c 100644 (file)
@@ -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; \