From 1d1aa4581b854d0c6c015bf462feb35e551a64c6 Mon Sep 17 00:00:00 2001 From: NY00123 Date: Wed, 15 Apr 2020 13:21:11 +0300 Subject: [PATCH] sw/src/track.cpp: If interpolation is enabled, also cover the SO's midpoint. Fixes aiming at a remote controlled SO. --- source/sw/src/track.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index c00472ddc..0eaf513b8 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -903,6 +903,14 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop) 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++) { TRAVERSE_SPRITE_STAT(headspritestat[StatList[i]], sp_num, next_sp_num)