- Remove DCorePlayer::getCameraAngles().

* `CameraAngles` used to be private within `PlayerAngles` and accessed via a friendship with `GameInput`.
* Just make it public for now, its not worth the complex setup to protect against this as we can control access by simply not exporting it to ZScript.
This commit is contained in:
Mitchell Richters 2023-10-29 20:54:51 +11:00
parent bd3184cf49
commit 0bbfe81a92
3 changed files with 3 additions and 8 deletions

View file

@ -71,11 +71,6 @@ public:
return angles;
}
const DRotator& getCameraAngles() const
{
return CameraAngles;
}
void updateCameraAngles(const double interpfrac)
{
// Apply the current interpolated angle state to the render angles.

View file

@ -421,7 +421,7 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
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->getCameraAngles().Yaw - cang).Normalized360().Degrees();
auto const daang = -(pp->CameraAngles.Yaw - cang).Normalized360().Degrees();
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);

View file

@ -768,7 +768,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
}
tsp->pos = pos;
tsp->Angles.Yaw = pp->getCameraAngles().Yaw;
tsp->Angles.Yaw = pp->CameraAngles.Yaw;
//continue;
}
else
@ -1413,7 +1413,7 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
if (spnum >= 0)
{
const auto daang = -(pp->getCameraAngles().Yaw - cang).Normalized360().Degrees();
const auto daang = -(pp->CameraAngles.Yaw - cang).Normalized360().Degrees();
auto vect = OutAutomapVector(mxy - cpos, cangvect, czoom, xydim);
// This repeat scale is correct.