3 // define this if svqc code wants to use .frame2 and .lerpfrac
4 //#define CSQCMODEL_HAVE_TWO_FRAMES
6 // don't define this ever
7 //#define CSQCMODEL_SUPPORT_GETTAGINFO_BEFORE_DRAW
9 // server decides crouching, this lags, but so be it
10 //#define CSQCMODEL_SERVERSIDE_CROUCH
14 # define TAG_ENTITY_NAME tag_networkentity
15 # define TAG_ENTITY_TYPE float
16 .float tag_networkentity;
18 # define TAG_VIEWLOC_NAME tag_networkviewloc
19 # define TAG_VIEWLOC_TYPE int
20 .float tag_networkviewloc;
22 # define TAG_ENTITY_NAME tag_entity
23 # define TAG_ENTITY_TYPE entity
25 # define TAG_VIEWLOC_NAME viewloc
26 # define TAG_VIEWLOC_TYPE entity
32 // add properties you want networked to CSQC here
33 #define CSQCMODEL_EXTRAPROPERTIES \
34 CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
35 CSQCMODEL_PROPERTY(BIT(1), int, ReadInt24_t, WriteInt24_t, effects) \
36 CSQCMODEL_PROPERTY(BIT(2), int, ReadByte, WriteByte, modelflags) \
37 CSQCMODEL_PROPERTY_SCALED(BIT(3), float, ReadByte, WriteByte, alpha, 254, -1, 254) \
38 CSQCMODEL_PROPERTY(BIT(4), int, ReadByte, WriteByte, skin) \
39 CSQCMODEL_PROPERTY(BIT(5), float, ReadApproxPastTime, WriteApproxPastTime, death_time) \
40 CSQCMODEL_PROPERTY(BIT(6), float, ReadByte, WriteByte, solid) \
41 CSQCMODEL_IF(!isplayer) \
42 CSQCMODEL_PROPERTY(BIT(7), TAG_ENTITY_TYPE, ReadShort, WriteEntity, TAG_ENTITY_NAME) \
43 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \
44 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \
45 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \
46 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 254, -1, 254) \
47 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 254, -1, 254) \
48 CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 254, -1, 254) \
50 CSQCMODEL_IF(isplayer) \
51 CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \
52 CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
53 CSQCMODEL_IF(!islocalplayer) \
54 CSQCMODEL_PROPERTY(BIT(8), float, ReadChar, WriteChar, anim_lower_action) \
55 CSQCMODEL_PROPERTY(BIT(8), float, ReadApproxPastTime, WriteApproxPastTime, anim_lower_time) \
57 CSQCMODEL_PROPERTY(BIT(9), float, ReadChar, WriteChar, anim_upper_action) \
58 CSQCMODEL_PROPERTY(BIT(9), float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \
60 CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \
61 CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) \
62 CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \
63 CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
64 CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \
65 CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count) \
66 CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype)
67 // TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody
69 // add hook function calls here
70 #define CSQCPLAYER_HOOK_POSTCAMERASETUP() \
71 CSQCPlayer_SetViewLocation()
73 // force updates of player entities this frequently (per second) even if unchanged
74 #ifndef CSQCPLAYER_FORCE_UPDATES
75 #define CSQCPLAYER_FORCE_UPDATES 4
79 //vector PL_MIN = ...;
80 //vector PL_MAX = ...;
81 //vector PL_VIEW_OFS = ...;
82 //vector PL_CROUCH_MIN = ...;
83 //vector PL_CROUCH_MAX = ...;
84 //vector PL_CROUCH_VIEW_OFS = ...;
87 # define CSQCMODEL_AUTOINIT(e) CSQCModel_LinkEntity(e)
88 # define CSQCMODEL_AUTOUPDATE(e) CSQCModel_CheckUpdate(e)
91 #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE