fix nametag rendering bug

This commit is contained in:
Alug committed 2024-02-24 15:33:50 +01:00
1 parent 6d28893f85
commit 5b850f1b49
1 file changed
+5 -4
+5 -4
View File
@@ -9059,9 +9059,6 @@ static void K_drawNameTags(void)
distance = R_PointToDist(players[i].mo->x, players[i].mo->y);
if (distance > maxdistance)
continue;
an = R_PointToAngle2(camera[0].x, camera[0].y, players[i].mo->x, players[i].mo->y) - camera[0].angle;
if (an > ANGLE_90 && an < ANGLE_270)
continue; // behind back
if (!P_CheckSight(stplyr->mo, players[i].mo))
continue;
@@ -9108,7 +9105,11 @@ static void K_drawNameTags(void)
dup = vid.dupx;
K_GetScreenCoords(&pos, stplyr, camera, players[i].mo->x, players[i].mo->y, players[i].mo->z + players[i].mo->height);
//Check for negative screencoords
if (pos.x == -1 || pos.y == -1)
continue;
//Flipcam off
if (players[i].mo->eflags & MFE_VERTICALFLIP && !(players[i].pflags & PF_FLIPCAM))
pos.y += players[i].mo->height;