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 141bc67..83178ba 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 1baad7b..e0098b4 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; \