]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/ent_cs.qc
Merge branch 'Mario/survival' into 'pending-release'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qc
index 5366371458fe52fadb86e3c2d7fc3dd8b2ca44db..b84a98ca6d3c9d1f723eec988d7cb89bb2de9918 100644 (file)
@@ -115,7 +115,7 @@ ENTCS_PROP(ORIGIN, false, origin, origin, ENTCS_SET_NORMAL,
        { WriteVector(chan, ent.origin); },
        { ent.has_sv_origin = true; vector v = ReadVector(); setorigin(ent, v); })
 
-#define DEC_FACTOR (360 / 32)
+#define DEC_FACTOR (360 / 64)
 ENTCS_PROP_CODED(ANGLES, false, angles_y, angles_y, ENTCS_SET_NORMAL, DEC_FACTOR,
        { WriteByte(chan, ent.angles.y / DEC_FACTOR); },
        { vector v = '0 0 0'; v.y = ReadByte() * DEC_FACTOR; ent.angles = v; })
@@ -157,6 +157,11 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
        { WriteByte(chan, ent.sv_solid); },
        { ent.sv_solid = ReadByte(); })
 
+// gamemode specific player survival status (independent of score and frags)
+ENTCS_PROP(SURVIVAL_STATUS, true, survival_status, survival_status, ENTCS_SET_NORMAL,
+       { WriteShort(chan, ent.survival_status); },
+       { ent.survival_status = ReadShort(); })
+
 #ifdef SVQC
 
        int ENTCS_PUBLICMASK = 0, ENTCS_PRIVATEMASK = 0;
@@ -230,8 +235,8 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                }
 
                // always send origin of players even if they stand still otherwise
-               // if a teammate isn't in my pvs and his health (or view angle or name
-               // etc...) changes then his tag disappears
+               // if a teammate isn't in my pvs and their health (or view angle or name
+               // etc...) changes then their tag disappears
                if (IS_PLAYER(this.owner))
                        this.SendFlags |= BIT(ENTCS_PROP_ORIGIN_id);