- take care of the last tileGetTexture call in Duke.

This commit is contained in:
Christoph Oelckers 2022-12-13 21:25:35 +01:00
parent 6248c8813b
commit eee551ce15

View file

@ -417,19 +417,22 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
}
}
auto basetex = TexMan.CheckForTexture("APLAYERTOP", ETextureType::Any);
if (!basetex.isValid()) return true;
for (int p = connecthead; p >= 0; p = connectpoint2[p])
{
if (p == screenpeek || ud.coop == 1)
{
auto& pp = ps[p];
auto act = pp.GetActor();
int i = TILE_APLAYERTOP + (act->vel.X > 1 && pp.on_ground ? (PlayClock >> 4) & 3 : 0);
basetex = basetex + (act->vel.X > 1 && pp.on_ground ? (PlayClock >> 4) & 3 : 0);
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 = -(pp.Angles.getCameraAngles().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,
DrawTexture(twod, basetex, false, 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);
}
}