Use WriteShort for mins/maxs linking
authorMario <mario.mario@y7mail.com>
Sat, 9 Nov 2013 12:41:18 +0000 (23:41 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 9 Nov 2013 12:41:18 +0000 (23:41 +1100)
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/common.qh

index d503571..b194752 100644 (file)
@@ -237,9 +237,9 @@ void CSQCModel_Read(float isnew)
 
        if(sf & CSQCMODEL_PROPERTY_MODELINDEX)
        {
-               //vector oldmins = self.mins, oldmaxs = self.maxs;
+               vector pmin = self.mins, pmax = self.maxs;
                setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax
-               //setsize(self, oldmins, oldmaxs);
+               setsize(self, pmin, pmax);
        }
 
        if(sf & CSQCMODEL_PROPERTY_TELEPORTED)
index 5d50559..4cf6017 100644 (file)
@@ -66,12 +66,12 @@ IN THE SOFTWARE.\
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_x) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_y) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_z) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, mins_x) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, mins_y) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, mins_z) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, maxs_x) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, maxs_y) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadChar, WriteChar, maxs_z) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_x) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_y) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_z) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_x) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_y) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_z) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_x) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, float, ReadAngle, WriteAngle, angles_y) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_z) \