1 // define this if svqc code wants to use .frame2 and .lerpfrac
2 //#define CSQCMODEL_HAVE_TWO_FRAMES
4 // don't define this ever
5 //#define CSQCMODEL_SUPPORT_GETTAGINFO_BEFORE_DRAW
7 // server decides crouching, this lags, but so be it
8 #define CSQCMODEL_SERVERSIDE_CROUCH
12 # define TAG_ENTITY_NAME tag_networkentity
13 # define TAG_ENTITY_TYPE float
14 .float tag_networkentity;
16 # define TAG_ENTITY_NAME tag_entity
17 # define TAG_ENTITY_TYPE entity
23 // add properties you want networked to CSQC here
24 #define CSQCMODEL_EXTRAPROPERTIES \
25 CSQCMODEL_PROPERTY(1, float, ReadShort, WriteShort, colormap) \
26 CSQCMODEL_PROPERTY(2, float, ReadInt24_t, WriteInt24_t, effects) \
27 CSQCMODEL_PROPERTY(4, float, ReadByte, WriteByte, modelflags) \
28 CSQCMODEL_PROPERTY_SCALED(8, float, ReadByte, WriteByte, alpha, 254, -1, 254) \
29 CSQCMODEL_PROPERTY(16, float, ReadByte, WriteByte, skin) \
30 CSQCMODEL_PROPERTY(32, float, ReadApproxPastTime, WriteApproxPastTime, death_time) \
31 CSQCMODEL_PROPERTY(64, float, ReadByte, WriteByte, solid) \
32 CSQCMODEL_IF(!isplayer) \
33 CSQCMODEL_PROPERTY(128, TAG_ENTITY_TYPE, ReadShort, WriteEntity, TAG_ENTITY_NAME) \
34 CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_x, 255, 0, 255) \
35 CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_y, 255, 0, 255) \
36 CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_z, 255, 0, 255) \
38 CSQCMODEL_IF(isplayer) \
39 CSQCMODEL_PROPERTY(128, float, ReadByte, WriteByte, anim_state) \
40 CSQCMODEL_PROPERTY(128, float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
41 CSQCMODEL_IF(!islocalplayer) \
42 CSQCMODEL_PROPERTY(256, float, ReadChar, WriteChar, anim_lower_action) \
43 CSQCMODEL_PROPERTY(256, float, ReadApproxPastTime, WriteApproxPastTime, anim_lower_time) \
45 CSQCMODEL_PROPERTY(512, float, ReadChar, WriteChar, anim_upper_action) \
46 CSQCMODEL_PROPERTY(512, float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \
47 CSQCMODEL_PROPERTY(1024, float, ReadAngle, WriteAngle, v_angle_x) \
49 // TODO get rid of colormod/glowmod here, find good solution for nex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody
51 // add hook function calls here
52 #define CSQCMODEL_HOOK_PREUPDATE \
53 CSQCModel_Hook_PreUpdate(isnew, isplayer, islocalplayer);
54 #define CSQCMODEL_HOOK_POSTUPDATE \
55 CSQCModel_Hook_PostUpdate(isnew, isplayer, islocalplayer);
56 #define CSQCMODEL_HOOK_PREDRAW \
57 CSQCModel_Hook_PreDraw(isplayer);
58 #define CSQCPLAYER_HOOK_POSTCAMERASETUP
60 // force updates of player entities that often even if unchanged
61 #define CSQCPLAYER_FORCE_UPDATES 0.25
64 //vector PL_MIN = ...;
65 //vector PL_MAX = ...;
66 //vector PL_VIEW_OFS = ...;
67 //vector PL_CROUCH_MIN = ...;
68 //vector PL_CROUCH_MAX = ...;
69 //vector PL_CROUCH_VIEW_OFS = ...;
72 # define CSQCMODEL_AUTOINIT() CSQCModel_LinkEntity()
73 # define CSQCMODEL_AUTOUPDATE() CSQCModel_CheckUpdate()
76 #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE