InterpolateOrigin_Do();
// TODO csqcplayers: run prediction here too
CSQCModel_InterpolateAnimation_Do();
+
+ { CSQCMODELS_HOOK_PREDRAW }
}
void CSQCModel_Read()
self.iflags |= IFLAG_ANGLES; // interpolate angles too
+ { CSQCMODELS_HOOK_PREUPDATE }
+
CSQCPlayer_PreUpdate();
InterpolateOrigin_Undo();
CSQCModel_InterpolateAnimation_PreNote(sf);
InterpolateOrigin_Note();
CSQCPlayer_PostUpdate();
+ { CSQCMODELS_HOOK_POSTUPDATE }
+
#ifdef CSQCMODELS_SUPPORT_GETTAGINFO_BEFORE_DRAW
InterpolateOrigin_Do();
CSQCModel_InterpolateAnimation_Do();
PROPERTY(2, ReadAngle, WriteAngle, angles_y) \
PROPERTY(2, ReadAngle, WriteAngle, angles_z) \
PROPERTY(4, ReadShort, WriteShort, modelindex) \
- PROPERTY(16, ReadByte, WriteByte, skin) \
- PROPERTY(32, ReadInt24_t, WriteInt24_t, effects) \
- PROPERTY_SCALED(64, ReadByte, WriteByte, alpha, 255, 0, 255) \
- PROPERTY_SCALED(128, ReadByte, WriteByte, glowmod_x, 32, 0, 255) \
- PROPERTY_SCALED(128, ReadByte, WriteByte, glowmod_y, 32, 0, 255) \
- PROPERTY_SCALED(128, ReadByte, WriteByte, glowmod_z, 32, 0, 255) \
- PROPERTY(256, ReadChar, WriteChar, view_ofs_z) \
- PROPERTY(512, ReadShort, WriteShort, colormap)
+ PROPERTY(8, ReadChar, WriteChar, view_ofs_z) \
+ CSQCMODELS_EXTRAPROPERTIES(16)
#ifdef CSQCMODELS_HAVE_TWO_FRAMES
.float frame3;
+// define this if svqc code wants to use .frame2 and .lerpfrac
#define CSQCMODELS_HAVE_TWO_FRAMES
+
+// don't define this ever
//#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) \
+ PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_x, 32, 0, 255) \
+ PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_y, 32, 0, 255) \
+ PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_z, 32, 0, 255)
+
+// add hook function calls here
+#define CSQCMODELS_HOOK_PREUPDATE
+#define CSQCMODELS_HOOK_POSTUPDATE
+#define CSQCMODELS_HOOK_PREDRAW