From 5a19f5cd4d3ffc94b906d5ea278c8e1aa0dcf941 Mon Sep 17 00:00:00 2001 From: nukeykt Date: Tue, 12 Nov 2019 21:25:16 +0900 Subject: [PATCH] Do not hide player sprite and temporarily disable interpolation in 3rd person mode --- source/exhumed/src/exhumed.cpp | 2 +- source/exhumed/src/view.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 45c1ad89b..69dd04cb9 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -1988,7 +1988,7 @@ static inline int32_t calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk // { // return 65536; // } - if (bRecord || bPlayback || nFreeze != 0) + if (bRecord || bPlayback || nFreeze != 0 || bCamera) return 65536; int32_t rfreq = (refreshfreq != -1 ? refreshfreq : 60); uint64_t elapsedFrames = tabledivide64(((uint64_t) (totalclk - ototalclk).toScale16()) * rfreq, 65536*120); diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 78bf582b8..a6f9de6f3 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -412,8 +412,11 @@ void DrawView(int smoothRatio) nSector = nPlayerViewSect[nLocalPlayer]; nAngle = q16angle_interpolate16(PlayerList[nLocalPlayer].q16oangle, PlayerList[nLocalPlayer].q16angle, smoothRatio); - sprite[nPlayerSprite].cstat |= CSTAT_SPRITE_INVISIBLE; - sprite[nDoppleSprite[nLocalPlayer]].cstat |= CSTAT_SPRITE_INVISIBLE; + if (!bCamera) + { + sprite[nPlayerSprite].cstat |= CSTAT_SPRITE_INVISIBLE; + sprite[nDoppleSprite[nLocalPlayer]].cstat |= CSTAT_SPRITE_INVISIBLE; + } } nCameraa = nAngle;