-// #define PROP(public, fld, sv, cl)
-#define ENTCS_NETPROPS(PROP) \
- PROP(true, sv_entnum, \
- { WriteByte(chan, etof(player) - 1); }, \
- { this.sv_entnum = ReadByte(); }) \
+#define ENTCS_SET_NORMAL(var, x) MACRO_BEGIN \
+ var = x; \
+MACRO_END
+
+/** the engine player name strings are mutable! */
+#define ENTCS_SET_MUTABLE_STRING(var, x) MACRO_BEGIN \
+ if (var) strunzone(var); \
+ var = strzone(x); \
+MACRO_END
+
+// #define PROP(public, fld, set, sv, cl)
+#define ENTCS_NETPROPS(ent, PROP) PROP(false, sv_entnum, ENTCS_SET_NORMAL, {}, {}) /* sentinel */ \
+ PROP(false, origin, ENTCS_SET_NORMAL, \
+ { WriteShort(chan, ent.origin.x); WriteShort(chan, ent.origin.y); \
+ WriteShort(chan, ent.origin.z); }, \
+ { ent.has_sv_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(ent, v); }) \