]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/ent_cs.qc
Merge branch 'master' into mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qc
index ff67a72cdc21a0c5cf398a16de87918200ea64df..dbadc9abbd6eabe1ff1a5bbd8539bd0d247577a5 100644 (file)
        { vector v = '0 0 0'; v.y = ReadByte() / 256 * 360; this.angles = v; }) \
     \
        PROP(false, health, \
-       { WriteByte(chan, this.health / 10);  /* FIXME: use a better scale? */ }, \
+       { WriteByte(chan, bound(0, this.health / 10, 255));  /* FIXME: use a better scale? */ }, \
        { this.healthvalue = ReadByte() * 10; }) \
     \
        PROP(false, armorvalue, \
-       { WriteByte(chan, this.armorvalue / 10);  /* FIXME: use a better scale? */ }, \
+       { WriteByte(chan, bound(0, this.armorvalue / 10, 255));  /* FIXME: use a better scale? */ }, \
        { this.armorvalue = ReadByte() * 10; }) \
     \
        PROP(true, netname, \