sw/src/track.cpp: If interpolation is enabled, also cover

the SO's midpoint. Fixes aiming at a remote controlled SO.
This commit is contained in:
NY00123 2020-04-15 13:21:11 +03:00 committed by Christoph Oelckers
parent 2974af3178
commit 1d1aa4581b

View file

@ -903,6 +903,14 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
I_Error("Forgot to tag outer loop for Sector Object #%d", (int)(sop - SectorObject)); I_Error("Forgot to tag outer loop for Sector Object #%d", (int)(sop - SectorObject));
} }
// interpolate midpoint, for aiming at a remote controlled SO
if (InterpolateSectObj)
{
setinterpolation(&sop->xmid);
setinterpolation(&sop->ymid);
setinterpolation(&sop->zmid);
}
for (i = 0; i < (int)SIZ(StatList); i++) for (i = 0; i < (int)SIZ(StatList); i++)
{ {
TRAVERSE_SPRITE_STAT(headspritestat[StatList[i]], sp_num, next_sp_num) TRAVERSE_SPRITE_STAT(headspritestat[StatList[i]], sp_num, next_sp_num)