diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index cafa9ff50e9a6f3560dfebed877f98c9b1e4ea24..4944ff5a8af9a0bc5853ca3f6546a3b8124c4694 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5378,13 +5378,24 @@ static void HWR_ProjectSprite(mobj_t *thing) if ((thing->flags2 & MF2_LINKDRAW) && thing->tracer) { + interpmobjstate_t tracer_interp = {}; + if (! R_ThingVisible(thing->tracer)) return; + if (R_UsingFrameInterpolation() && !paused) + { + R_InterpolateMobjState(thing->tracer, rendertimefrac, &tracer_interp); + } + else + { + R_InterpolateMobjState(thing->tracer, FRACUNIT, &tracer_interp); + } + // calculate tz for tracer, same way it is calculated for this sprite // transform the origin point - tr_x = FIXED_TO_FLOAT(thing->tracer->x) - gl_viewx; - tr_y = FIXED_TO_FLOAT(thing->tracer->y) - gl_viewy; + tr_x = FIXED_TO_FLOAT(tracer_interp.x) - gl_viewx; + tr_y = FIXED_TO_FLOAT(tracer_interp.y) - gl_viewy; // rotation around vertical axis tracertz = (tr_x * gl_viewcos) + (tr_y * gl_viewsin);