#undef PROPERTY_SCALED
#undef PROPERTY
+ if(sf & PROPERTY_MODELINDEX)
+ setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax
+
if(sf & PROPERTY_TELEPORTED)
self.iflags |= IFLAG_TELEPORTED;
CSQCModel_InterpolateAnimation_Do();
#endif
+ // relink
+ setorigin(self, self.origin);
+
// draw it
self.drawmask = MASK_NORMAL;
self.predraw = CSQCModel_Draw;
#define PROPERTY_FRAME2 16384
#define PROPERTY_LERPFRAC 8192
#define PROPERTY_TELEPORTED 4096 // the "teleport bit" cancelling interpolation
+#define PROPERTY_MODELINDEX 2048
+#define PROPERTY_ORIGIN 1024
+#define PROPERTY_YAW 512
+#define PROPERTY_PITCHROLL 256
#define ALLPROPERTIES_COMMON \
PROPERTY(PROPERTY_FRAME, ReadByte, WriteByte, frame) \
- PROPERTY(1, ReadCoord, WriteCoord, origin_x) \
- PROPERTY(1, ReadCoord, WriteCoord, origin_y) \
- PROPERTY(1, ReadCoord, WriteCoord, origin_z) \
- PROPERTY(2, ReadAngle, WriteAngle, angles_x) \
- PROPERTY(2, ReadAngle, WriteAngle, angles_y) \
- PROPERTY(2, ReadAngle, WriteAngle, angles_z) \
- PROPERTY(4, ReadShort, WriteShort, modelindex) \
- CSQCMODELS_EXTRAPROPERTIES(8)
+ PROPERTY(PROPERTY_MODELINDEX, ReadShort, WriteShort, modelindex) \
+ PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_x) \
+ PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_y) \
+ PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_z) \
+ PROPERTY(PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_x) \
+ PROPERTY(PROPERTY_YAW, ReadAngle, WriteAngle, angles_y) \
+ PROPERTY(PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_z) \
+ CSQCMODELS_EXTRAPROPERTIES
#ifdef CSQCMODELS_HAVE_TWO_FRAMES
.float frame3;
//#define CSQCMODELS_SUPPORT_GETTAGINFO_BEFORE_DRAW
// add properties you want networked to CSQC here
-#define CSQCMODELS_EXTRAPROPERTIES(multiplier) \
- PROPERTY(multiplier*1, ReadByte, WriteByte, skin) \
- PROPERTY(multiplier*2, ReadShort, WriteShort, colormap) \
- PROPERTY(multiplier*4, ReadInt24_t, WriteInt24_t, effects) \
- PROPERTY_SCALED(multiplier*8, ReadByte, WriteByte, alpha, 255, 0, 255)
+#define CSQCMODELS_EXTRAPROPERTIES \
+ PROPERTY(1, ReadByte, WriteByte, skin) \
+ PROPERTY(2, ReadShort, WriteShort, colormap) \
+ PROPERTY(4, ReadInt24_t, WriteInt24_t, effects) \
+ PROPERTY_SCALED(8, ReadByte, WriteByte, alpha, 255, 0, 255)
// add hook function calls here
#define CSQCMODELS_HOOK_PREUPDATE