-#ifndef CSQCMODEL_SETTINGS_H
-#define CSQCMODEL_SETTINGS_H
+#pragma once
// define this if svqc code wants to use .frame2 and .lerpfrac
//#define CSQCMODEL_HAVE_TWO_FRAMES
# define TAG_VIEWLOC_NAME tag_networkviewloc
# define TAG_VIEWLOC_TYPE int
.float tag_networkviewloc;
-
-# define MOVETYPE_NAME move_movetype
#else
# define TAG_ENTITY_NAME tag_entity
# define TAG_ENTITY_TYPE entity
# define TAG_VIEWLOC_NAME viewloc
# define TAG_VIEWLOC_TYPE entity
-
-# define MOVETYPE_NAME movetype
#endif
-// new fields
-.vector v_angle;
-
// add properties you want networked to CSQC here
#define CSQCMODEL_EXTRAPROPERTIES \
CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 254, -1, 254) \
CSQCMODEL_ENDIF \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) \
CSQCMODEL_IF(isplayer) \
CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \
CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
CSQCMODEL_ENDIF \
CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \
CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) \
- CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \
+ CSQCMODEL_PROPERTY(BIT(12), float, ReadCoord, WriteCoord, scale) \
CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \
- CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count) \
- CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, MOVETYPE_NAME)
-// TODO get rid of colormod/glowmod here, find good solution for vortex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody
+ CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) \
+ CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype)
+// TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody
// add hook function calls here
-#define CSQCMODEL_HOOK_PREUPDATE \
- CSQCModel_Hook_PreUpdate(isnew, isplayer, islocalplayer);
-#define CSQCMODEL_HOOK_POSTUPDATE \
- CSQCModel_Hook_PostUpdate(isnew, isplayer, islocalplayer);
-#define CSQCMODEL_HOOK_PREDRAW \
- CSQCModel_Hook_PreDraw(isplayer);
#define CSQCPLAYER_HOOK_POSTCAMERASETUP() \
- CSQCPlayer_SetViewLocation()
+ viewloc_SetViewLocation()
-// force updates of player entities that often even if unchanged
+// force updates of player entities this frequently (per second) even if unchanged
#ifndef CSQCPLAYER_FORCE_UPDATES
-#define CSQCPLAYER_FORCE_UPDATES 0.25
+#define CSQCPLAYER_FORCE_UPDATES 4
#endif
// mod must define:
#endif
#define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE
-#endif