From 6832bf044e6d9947ae09dd1da663f7a226bf9037 Mon Sep 17 00:00:00 2001 From: lhofhansl Date: Sun, 28 May 2023 11:36:34 -0700 Subject: [PATCH] Avoid jittering when player is attached (#12439) * Avoid very jittering when player is attached. Co-authored-by: sfan5 Co-authored-by: Vitaliy --- src/activeobjectmgr.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/activeobjectmgr.h b/src/activeobjectmgr.h index aa0538e60..d838c04ca 100644 --- a/src/activeobjectmgr.h +++ b/src/activeobjectmgr.h @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#include +#include #include "irrlichttypes.h" class TestClientActiveObjectMgr; @@ -38,8 +38,7 @@ public: T *getActiveObject(u16 id) { - typename std::unordered_map::const_iterator n = - m_active_objects.find(id); + auto n = m_active_objects.find(id); return (n != m_active_objects.end() ? n->second : nullptr); } @@ -62,5 +61,5 @@ protected: return id != 0 && m_active_objects.find(id) == m_active_objects.end(); } - std::unordered_map m_active_objects; + std::map m_active_objects; // ordered to fix #10985 };