rename driftgauge cvar and fix nametag rendering bug

This commit is contained in:
Alug committed 2024-02-20 18:12:17 +01:00
1 parent 97766710c0
commit 7fa382d4e9
2 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -546,7 +546,7 @@ static CV_PossibleValue_t driftgaugeoffset_cons_t[] = {
static CV_PossibleValue_t driftgaugestyle_cons_t[] = {
{1, "Default"}, {2, "Small"}, {3, "Big Numbers"}, {4, "Numbers Only"}, {0, NULL}};
consvar_t cv_driftgauge = {"driftgauge", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_driftgauge = {"kartdriftgauge", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_driftgaugeofs = {"driftgaugeoffset", "-20", CV_FLOAT|CV_SAVE, driftgaugeoffset_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_driftgaugetrans = {"driftgaugetransparency", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_driftgaugestyle = {"driftgaugestyle", "1", CV_SAVE, driftgaugestyle_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
+5 -4
View File
@@ -9063,9 +9063,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;
@@ -9112,7 +9109,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;