void shownames_think()
{
self.origin = self.owner.origin + '0 0 1' * 48;
- if(self.health != max(0, floor(self.owner.health)) || self.armorvalue != max(0, floor(self.owner.armorvalue)))
+ if(self.health != max(0, ceil(self.owner.health/10)))
{
- self.health = max(0, floor(self.owner.health));
- self.armorvalue = max(0, floor(self.owner.armorvalue));
+ self.health = max(0, ceil(self.owner.health/10));
self.SendFlags |= 1;
}
- if(self.armorvalue != max(0, floor(self.owner.armorvalue)))
+ if(self.armorvalue != max(0, ceil(self.owner.armorvalue/10)))
{
- self.armorvalue = max(0, floor(self.owner.armorvalue));
+ self.armorvalue = max(0, ceil(self.owner.armorvalue/10));
self.SendFlags |= 2;
}
self.nextthink = time;
}
-float shownames_customize()
-{
- if(self.owner.classname == "player") // only send players, no spectators!
- if(self.owner != other) // no need to spam own info
- if(vlen(other.origin - self.origin) < autocvar_sv_shownames_cull_distance) // distance cull
- if((teams_matter && self.owner.team == other.team) || checkpvs(self.origin, other))
- return TRUE;
-
- return FALSE;
-}
-
.float muted; // to be used by prvm_edictset server playernumber muted 1
float Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol)
// message "": do not say, just test flood control