Fix driftgauge flipcam logic (closes #130)

This commit is contained in:
GenericHeroGuy 2025-09-28 18:52:46 +02:00
parent 1e01b387df
commit 0d2f2e106c

View file

@ -6064,10 +6064,11 @@ void K_DrawDriftGauge(void)
return; return;
mobj_t *mo = stplyr->mo; mobj_t *mo = stplyr->mo;
fixed_t gaugeofs = FixedMul(cv_driftgaugeoffset.value, ((cv_driftgaugeoffset.value > 0) ? mo->scale : mapobjectscale));
vector3_t pos = { vector3_t pos = {
R_InterpolateFixed(mo->old_x, mo->x) + mo->sprxoff, R_InterpolateFixed(mo->old_x, mo->x) + mo->sprxoff,
R_InterpolateFixed(mo->old_y, mo->y) + mo->spryoff, R_InterpolateFixed(mo->old_y, mo->y) + mo->spryoff,
R_InterpolateFixed(mo->old_z, mo->z) + mo->sprzoff + FixedMul(cv_driftgaugeoffset.value, ((cv_driftgaugeoffset.value > 0) ? mo->scale : mapobjectscale)), R_InterpolateFixed(mo->old_z, mo->z) + mo->sprzoff + (mo->eflags & MFE_VERTICALFLIP ? mo->height - gaugeofs : gaugeofs),
}; };
trackingResult_t res; trackingResult_t res;
INT32 basex, basey, i = 0; INT32 basex, basey, i = 0;
@ -6077,12 +6078,6 @@ void K_DrawDriftGauge(void)
basex = res.x; basex = res.x;
basey = res.y; 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]; driftgauge_t *gauge = &driftgauges[cv_driftgauge.value];
// Deal with Wifi-Style when no purps // Deal with Wifi-Style when no purps
SINT8 holdupoffset = ((cv_driftgauge.value == DGAUGE_WIFI) && K_PurpleDriftActive()) + (K_UseColorHud() ? 1 : 0); SINT8 holdupoffset = ((cv_driftgauge.value == DGAUGE_WIFI) && K_PurpleDriftActive()) + (K_UseColorHud() ? 1 : 0);