fix nametag rendering bug
This commit is contained in:
1 parent
6d28893f85
commit
5b850f1b49
1 file changed
+5
-4
+5
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user