- Duke: Fix automap sprite angle which was not right with unsynchronised input.

This commit is contained in:
Mitchell Richters 2023-01-05 21:00:31 +11:00
parent 676cdba259
commit ba364a1cb6

View file

@ -423,10 +423,10 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
auto& pp = ps[p];
auto act = pp.GetActor();
int i = TILE_APLAYERTOP + (act->vel.X > 1 && pp.on_ground ? (PlayClock >> 4) & 3 : 0);
double j = clamp(czoom * act->spr.scale.Y + abs(pp.truefz - pp.GetActor()->getOffsetZ()) * REPEAT_SCALE, 0.333, 2.);
double j = clamp(czoom * act->spr.scale.Y + abs(pp.truefz - act->getOffsetZ()) * REPEAT_SCALE, (1. / 3.), 2.);
auto const vec = OutAutomapVector(mxy - cpos, cangvect, czoom, xydim);
auto const daang = -((!SyncInput() ? act->spr.Angles.Yaw : act->interpolatedyaw(interpfrac)) - cang).Normalized360().Degrees();
auto const daang = -(pp.Angles.RenderAngles.Yaw - cang).Normalized360().Degrees();
DrawTexture(twod, tileGetTexture(i), vec.X, vec.Y, DTA_TranslationIndex, TRANSLATION(Translation_Remap + setpal(&pp), act->spr.pal), DTA_CenterOffset, true,
DTA_Rotate, daang, DTA_Color, shadeToLight(act->spr.shade), DTA_ScaleX, j, DTA_ScaleY, j, TAG_DONE);