diff --git a/source/simulation2/components/CCmpPosition.cpp b/source/simulation2/components/CCmpPosition.cpp index 7ccb01121d..b566c58130 100644 --- a/source/simulation2/components/CCmpPosition.cpp +++ b/source/simulation2/components/CCmpPosition.cpp @@ -66,7 +66,7 @@ public: // Dynamic state: bool m_InWorld; - entity_pos_t m_X, m_Z, m_LastX, m_LastZ, m_PrevX, m_PrevZ; // these values contain undefined junk if !InWorld + entity_pos_t m_X, m_Z, m_LastX, m_LastZ; // these values contain undefined junk if !InWorld entity_pos_t m_YOffset; bool m_RelativeToGround; // whether m_YOffset is relative to terrain/water plane, or an absolute height @@ -203,8 +203,6 @@ public: m_InWorld = true; m_LastX = m_X; m_LastZ = m_Z; - m_PrevX = m_X; - m_PrevZ = m_Z; } AdvertisePositionChanges(); @@ -212,8 +210,8 @@ public: virtual void JumpTo(entity_pos_t x, entity_pos_t z) { - m_LastX = m_PrevX = m_X = x; - m_LastZ = m_PrevZ = m_Z = z; + m_LastX = m_X = x; + m_LastZ = m_Z = z; m_InWorld = true; AdvertisePositionChanges(); @@ -280,43 +278,6 @@ public: return CFixedVector2D(m_X, m_Z); } - virtual CFixedVector3D GetPreviousPosition() - { - if (!m_InWorld) - { - LOGERROR(L"CCmpPosition::GetPreviousPosition called on entity when IsInWorld is false"); - return CFixedVector3D(); - } - - entity_pos_t baseY; - if (m_RelativeToGround) - { - CmpPtr cmpTerrain(GetSimContext(), SYSTEM_ENTITY); - if (!cmpTerrain.null()) - baseY = cmpTerrain->GetGroundLevel(m_PrevX, m_PrevZ); - - if (m_Floating) - { - CmpPtr cmpWaterMan(GetSimContext(), SYSTEM_ENTITY); - if (!cmpWaterMan.null()) - baseY = std::max(baseY, cmpWaterMan->GetWaterLevel(m_PrevX, m_PrevZ)); - } - } - - return CFixedVector3D(m_PrevX, baseY + m_YOffset, m_PrevZ); - } - - virtual CFixedVector2D GetPreviousPosition2D() - { - if (!m_InWorld) - { - LOGERROR(L"CCmpPosition::GetPreviousPosition2D called on entity when IsInWorld is false"); - return CFixedVector2D(); - } - - return CFixedVector2D(m_PrevX, m_PrevZ); - } - virtual void TurnTo(entity_angle_t y) { m_RotY = y; @@ -447,9 +408,6 @@ public: } case MT_TurnStart: { - m_PrevX = m_LastX; - m_PrevZ = m_LastZ; - m_LastX = m_X; m_LastZ = m_Z; diff --git a/source/simulation2/components/ICmpPosition.cpp b/source/simulation2/components/ICmpPosition.cpp index 07f1dcd148..1e3c8b0efb 100644 --- a/source/simulation2/components/ICmpPosition.cpp +++ b/source/simulation2/components/ICmpPosition.cpp @@ -32,8 +32,6 @@ DEFINE_INTERFACE_METHOD_1("SetHeightFixed", void, ICmpPosition, SetHeightFixed, DEFINE_INTERFACE_METHOD_0("IsFloating", bool, ICmpPosition, IsFloating) DEFINE_INTERFACE_METHOD_0("GetPosition", CFixedVector3D, ICmpPosition, GetPosition) DEFINE_INTERFACE_METHOD_0("GetPosition2D", CFixedVector2D, ICmpPosition, GetPosition2D) -DEFINE_INTERFACE_METHOD_0("GetPreviousPosition", CFixedVector3D, ICmpPosition, GetPreviousPosition) -DEFINE_INTERFACE_METHOD_0("GetPreviousPosition2D", CFixedVector2D, ICmpPosition, GetPreviousPosition2D) DEFINE_INTERFACE_METHOD_1("TurnTo", void, ICmpPosition, TurnTo, entity_angle_t) DEFINE_INTERFACE_METHOD_1("SetYRotation", void, ICmpPosition, SetYRotation, entity_angle_t) DEFINE_INTERFACE_METHOD_2("SetXZRotation", void, ICmpPosition, SetXZRotation, entity_angle_t, entity_angle_t) diff --git a/source/simulation2/components/ICmpPosition.h b/source/simulation2/components/ICmpPosition.h index f675d63142..4a4b274534 100644 --- a/source/simulation2/components/ICmpPosition.h +++ b/source/simulation2/components/ICmpPosition.h @@ -108,19 +108,6 @@ public: */ virtual CFixedVector2D GetPosition2D() = 0; - /** - * Returns the previous turn's x,y,z position (no interpolation). - * Depends on the current terrain heightmap. - * Must not be called unless IsInWorld is true. - */ - virtual CFixedVector3D GetPreviousPosition() = 0; - - /** - * Returns the previous turn's x,z position (no interpolation). - * Must not be called unless IsInWorld is true. - */ - virtual CFixedVector2D GetPreviousPosition2D() = 0; - /** * Rotate smoothly to the given angle around the upwards axis. * @param y clockwise radians from the +Z axis. diff --git a/source/tools/profiler2/profiler2.js b/source/tools/profiler2/profiler2.js index 1e16f4db02..341ac64124 100644 --- a/source/tools/profiler2/profiler2.js +++ b/source/tools/profiler2/profiler2.js @@ -146,8 +146,8 @@ function refresh_thread(thread, callback_data) function rebuild_canvases() { - g_data.canvas_frames = $('').get(0); - g_data.canvas_zoom = $('').get(0); + g_data.canvas_frames = $('').get(0); + g_data.canvas_zoom = $('').get(0); g_data.text_output = $('
').get(0);
     
     set_frames_zoom_handlers(g_data.canvas_frames);