if(sf & CSQCMODEL_PROPERTY_MODELINDEX)
{
+ vector oldmins = self.mins, oldmaxs = self.maxs;
setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax
- // FIXME do we WANT this to override mins/maxs?
if(isplayer)
- setsize(self, PL_MIN, PL_MAX);
+ setsize(self, oldmins, oldmaxs);
else if(self.monsterid)
{
entity mon = get_monsterinfo(self.monsterid);
#define CSQCMODEL_PROPERTY_PITCHROLL 1024
#define CSQCMODEL_PROPERTY_FRAME2 512
#define CSQCMODEL_PROPERTY_LERPFRAC 256
+#define CSQCMODEL_PROPERTY_SIZE 128
#define ALLPROPERTIES_COMMON \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, float, ReadByte, WriteByte, frame) \
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, ReadCoord, WriteCoord, mins_x) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadCoord, WriteCoord, mins_y) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadCoord, WriteCoord, mins_z) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadCoord, WriteCoord, maxs_x) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadCoord, WriteCoord, maxs_y) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadCoord, WriteCoord, 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) \