Ticket #1865: 0004-Always-wait-for-at-least-one-interpolation-before-sk.patch

File 0004-Always-wait-for-at-least-one-interpolation-before-sk.patch, 1.0 KB (added by sbte, 11 years ago)
  • source/simulation2/components/CCmpPosition.cpp

    From 166e3bff7c096068fa8b3008b831eed771debe20 Mon Sep 17 00:00:00 2001
    From: "Sven (Sbte)" <svenb.linux@gmail.com>
    Date: Wed, 13 Mar 2013 21:45:30 +0100
    Subject: Always wait for at least one interpolation before skipping it
    
    ---
     source/simulation2/components/CCmpPosition.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/source/simulation2/components/CCmpPosition.cpp b/source/simulation2/components/CCmpPosition.cpp
    index 7306a00..cdc096b 100644
    a b public:  
    455455            m_LastRotY = m_RotY;
    456456
    457457            m_PositionChanged = m_X != m_PrevX || m_Z != m_PrevZ || m_RotY != m_PrevRotY || !m_Interpolated;
    458             m_Interpolated = false;
     458            m_Interpolated = !m_PositionChanged;
    459459
    460460            break;
    461461        }
    private:  
    481481            GetSimContext().GetComponentManager().PostMessage(GetEntityId(), msg);
    482482        }
    483483        m_PositionChanged = true;
     484        m_Interpolated = false;
    484485    }
    485486
    486487    bool m_PositionChanged;