- { 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, \
{ 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? */ }, \
return _entcs_send(this, to, sf, MSG_ENTITY);
}
return _entcs_send(this, to, sf, MSG_ENTITY);
}
e.nextthink = time;
Net_LinkEntity(e, false, 0, entcs_send);
if (!IS_REAL_CLIENT(player)) return;
e.nextthink = time;
Net_LinkEntity(e, false, 0, entcs_send);
if (!IS_REAL_CLIENT(player)) return;
assert(it.entcs);
_entcs_send(it.entcs, msg_entity = player, BITS(23), MSG_ONE);
assert(it.entcs);
_entcs_send(it.entcs, msg_entity = player, BITS(23), MSG_ONE);