Use LOS check for nametags

This commit is contained in:
Vortrex
2022-01-17 07:42:26 -06:00
parent a55ae11e67
commit 0cdcb73a01

View File

@@ -165,6 +165,13 @@ function updateNametags(element) {
let distance = playerPos.distance(elementPos);
if(distance <= nametagDistance) {
if(typeof game.processLineOfSight != "undefined") {
let losCheck = game.processLineOfSight(playerPos, elementPos, true, false, false, true, true, false, true, true);
if(losCheck != null) {
return false;
}
}
if(element.type == ELEMENT_PLAYER) {
let name = element.name;
let colour = COLOUR_WHITE;