namepos = myPos + eX * 2 * iconsize_y;
namesize = eX * mySize_x - eX * 2 * iconsize_y + eY * mySize_y;
- drawcolorcodedstring_aspect(namepos, GetPlayerName(self.the_entnum), namesize, a, DRAWFLAG_NORMAL);
+ drawcolorcodedstring_aspect(namepos, GetPlayerName(self.the_entnum-1), namesize, a, DRAWFLAG_NORMAL);
/* Or maybe a health bar instead?
*
drawhealthbar(o, rot * 90 * DEG2RAD, self.health, SPRITE_SIZE * t, SPRITE_HOTSPOT * t, SPRITE_HEALTHBAR_WIDTH * t, SPRITE_HEALTHBAR_HEIGHT * t, SPRITE_HEALTHBAR_MARGIN * t, SPRITE_HEALTHBAR_BORDER * t, align, self.teamradar_color, a * SPRITE_HEALTHBAR_BORDERALPHA, self.teamradar_color, a * SPRITE_HEALTHBAR_HEALTHALPHA, DRAWFLAG_NORMAL);
}
*/
+ print(vtos(o), "\n");
}
}
void ShowNames_Think()
{
-
-
+ self.draw2d = Draw_ShowNames;
+ self.nextthink = time;
+ print("think!\n");
}
// sendflags use: 1 = origin, 2 = health/armor, 0x80 = same team (includes health), 4 = entity out of range/culled
float SendEntity_ShowNames(entity to, float sendflags)
{
- if(self.owner == to) // no need to spam own coordinates/health
- return TRUE;
-
WriteByte(MSG_ENTITY, ENT_CLIENT_SHOWNAMES);
WriteByte(MSG_ENTITY, num_for_edict(self.owner));
float shownames_customize()
{
+ return TRUE;
if(vlen(other.origin - self.origin) < autocvar_sv_shownames_cull_distance)
+ if(self.owner != other) // no need to spam own coordinates
+ if(self.owner.team == other.team || (self.owner.team != other.team && checkpvs(self.origin, other)))
return TRUE;
- else
- return FALSE;
+
+ return FALSE;
}
.float muted; // to be used by prvm_edictset server playernumber muted 1