- Create DCoreActor::getRenderPos() and use within Duke.

This commit is contained in:
Mitchell Richters 2022-11-21 15:24:25 +11:00 committed by Christoph Oelckers
parent d1c5f9516f
commit 4de1b8ad86
2 changed files with 6 additions and 1 deletions

View file

@ -176,6 +176,11 @@ public:
return opos.plusZ(oviewzoffset);
}
DVector3 getRenderPos(const double interpfrac)
{
return interpolatedpos(interpfrac).plusZ(interpolatedvalue(oviewzoffset, viewzoffset, interpfrac));
}
sectortype* sector() const
{
return spr.sectp;

View file

@ -293,7 +293,7 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
}
else
{
cpos = viewer->interpolatedpos(interpfrac).plusZ(viewer->viewzoffset);
cpos = viewer->getRenderPos(interpfrac);
if (SyncInput())
{