// don't define this ever
//#define CSQCMODEL_SUPPORT_GETTAGINFO_BEFORE_DRAW
+// a hack for Xonotic
+#ifdef CSQC
+# define TAG_ENTITY_NAME tag_networkentity
+# define TAG_ENTITY_TYPE float
+.float tag_networkentity;
+#else
+# define TAG_ENTITY_NAME tag_entity
+# define TAG_ENTITY_TYPE entity
+#endif
+
// add properties you want networked to CSQC here
#define CSQCMODEL_EXTRAPROPERTIES \
CSQCMODEL_IF(isplayer) \
CSQCMODEL_PROPERTY_SCALED(8, float, ReadByte, WriteByte, alpha, 255, 0, 255) \
CSQCMODEL_ENDIF \
CSQCMODEL_IF(!isplayer) \
- CSQCMODEL_PROPERTY(1, entity, ReadCSQCEntity, WriteEntity, tag_entity) \
+ CSQCMODEL_PROPERTY(1, TAG_ENTITY_TYPE, ReadShort, WriteEntity, TAG_ENTITY_NAME) \
CSQCMODEL_ENDIF
-// declare "odd" fields here
-.entity tag_entity;
-
// add hook function calls here
#define CSQCMODEL_HOOK_PREUPDATE
#define CSQCMODEL_HOOK_POSTUPDATE