From 3d8d167cf477190b44364e14b8d6574803be3e6d Mon Sep 17 00:00:00 2001 From: NepDisk Date: Tue, 23 Sep 2025 10:25:32 -0400 Subject: [PATCH] Add flipcam support to object tracking --- src/k_hud.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/k_hud.c b/src/k_hud.c index ec6b684dd..c4afbd643 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -928,6 +928,11 @@ void K_ObjectTracking(trackingResult_t *result, const vector3_t *point, boolean result->x = -result->x; } + if (camera[cameraNum].postimgflags && POSTIMG_FLIP) + { + result->y = -result->y; + } + // Center results. result->x += screenHalfW; result->y += screenHalfH; @@ -6107,6 +6112,12 @@ void K_DrawDriftGauge(void) basex = res.x; basey = res.y; + // good ol' flipcam sigh... + if ((stplyr->pflags & PF_FLIPCAM) && (stplyr->mo->eflags & MFE_VERTICALFLIP)) + basey += 25*FRACUNIT; + else if (stplyr->mo->eflags & MFE_VERTICALFLIP) + basey += 5*FRACUNIT; + driftgauge_t *gauge = &driftgauges[cv_driftgauge.value]; // Deal with Wifi-Style when no purps SINT8 holdupoffset = ((cv_driftgauge.value == DGAUGE_WIFI) && K_PurpleDriftActive()) + (K_UseColorHud() ? 1 : 0);