mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
Revert "* Improve the entity ID system, and add priority system. We should no longer have clashes."
This reverts commit 1b97875dd6.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unordered_set>
|
||||
#include "client/common/AABB.hpp"
|
||||
#include "client/common/Vec3.hpp"
|
||||
#include "world/level/Material.hpp"
|
||||
@@ -40,22 +39,19 @@ struct EntityPos
|
||||
EntityPos()
|
||||
{
|
||||
m_yaw = 0, m_pitch = 0;
|
||||
m_bHasRot = false, m_bHasPos = false;
|
||||
m_bHasRot, m_bHasPos;
|
||||
};
|
||||
|
||||
EntityPos(const Vec3& pos)
|
||||
{
|
||||
m_pos = pos;
|
||||
m_yaw = m_pitch = 0;
|
||||
m_bHasPos = true;
|
||||
m_bHasRot = false;
|
||||
}
|
||||
|
||||
EntityPos(float yaw, float pitch)
|
||||
{
|
||||
m_yaw = yaw;
|
||||
m_pitch = pitch;
|
||||
m_bHasPos = false;
|
||||
m_bHasRot = true;
|
||||
}
|
||||
|
||||
@@ -69,8 +65,6 @@ struct EntityPos
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::unordered_set<int> EntityIDSet;
|
||||
|
||||
class Entity
|
||||
{
|
||||
private:
|
||||
@@ -140,7 +134,6 @@ public:
|
||||
virtual void markHurt();
|
||||
virtual void burn(int);
|
||||
virtual void lavaHurt();
|
||||
virtual bool isUnimportant();
|
||||
|
||||
int hashCode();
|
||||
|
||||
@@ -154,12 +147,8 @@ public:
|
||||
(m_pos.z - z) * (m_pos.z - z);
|
||||
}
|
||||
|
||||
private:
|
||||
int allocateEntityId();
|
||||
void releaseEntityId(int);
|
||||
static EntityIDSet s_EntityIDs;
|
||||
//static int entityCounter;
|
||||
public:
|
||||
static int entityCounter;
|
||||
static Random sharedRandom;
|
||||
|
||||
Vec3 m_pos;
|
||||
|
||||
Reference in New Issue
Block a user