forked from Mirrorlandia_minetest/minetest
Avoid jittering when player is attached (#12439)
* Avoid very jittering when player is attached. Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Vitaliy <numzer0@yandex.ru>
This commit is contained in:
parent
394dd9ffa5
commit
6832bf044e
@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include "irrlichttypes.h"
|
||||
|
||||
class TestClientActiveObjectMgr;
|
||||
@ -38,8 +38,7 @@ public:
|
||||
|
||||
T *getActiveObject(u16 id)
|
||||
{
|
||||
typename std::unordered_map<u16, T *>::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<u16, T *> m_active_objects;
|
||||
std::map<u16, T *> m_active_objects; // ordered to fix #10985
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user