diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 20:46:45 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 20:46:45 +0100 |
commit | 2ce26574efa89a5709f121acdf289ad3366d3881 (patch) | |
tree | 875fe891bb91d05539b7f691dbdd0a18b3ec88e9 /src/Entities | |
parent | ProtoProxy: Fixed connection on *nix. (diff) | |
download | cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar.gz cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar.bz2 cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar.lz cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar.xz cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.tar.zst cuberite-2ce26574efa89a5709f121acdf289ad3366d3881.zip |
Diffstat (limited to 'src/Entities')
-rw-r--r-- | src/Entities/Entity.cpp | 36 | ||||
-rw-r--r-- | src/Entities/Entity.h | 10 |
2 files changed, 1 insertions, 45 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 09fb7052d..ae98a1e91 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -4,9 +4,7 @@ #include "../World.h" #include "../Server.h" #include "../Root.h" -#include "../Vector3d.h" #include "../Matrix4f.h" -#include "../ReferenceManager.h" #include "../ClientHandle.h" #include "../Chunk.h" #include "../Simulator/FluidSimulator.h" @@ -32,8 +30,6 @@ cEntity::cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, d , m_MaxHealth(1) , m_AttachedTo(NULL) , m_Attachee(NULL) - , m_Referencers(new cReferenceManager(cReferenceManager::RFMNGR_REFERENCERS)) - , m_References(new cReferenceManager(cReferenceManager::RFMNGR_REFERENCES)) , m_bDirtyHead(true) , m_bDirtyOrientation(true) , m_bDirtyPosition(true) @@ -100,8 +96,6 @@ cEntity::~cEntity() LOGWARNING("ERROR: Entity deallocated without being destroyed"); ASSERT(!"Entity deallocated without being destroyed or unlinked"); } - delete m_Referencers; - delete m_References; } @@ -1430,33 +1424,3 @@ void cEntity::SetPosZ(double a_PosZ) - -////////////////////////////////////////////////////////////////////////// -// Reference stuffs -void cEntity::AddReference(cEntity * & a_EntityPtr) -{ - m_References->AddReference(a_EntityPtr); - a_EntityPtr->ReferencedBy(a_EntityPtr); -} - - - - - -void cEntity::ReferencedBy(cEntity * & a_EntityPtr) -{ - m_Referencers->AddReference(a_EntityPtr); -} - - - - - -void cEntity::Dereference(cEntity * & a_EntityPtr) -{ - m_Referencers->Dereference(a_EntityPtr); -} - - - - diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 91463bfd6..62dc42c3f 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -4,6 +4,7 @@ #include "../Item.h" #include "../Vector3d.h" #include "../Vector3f.h" +#include "../Vector3i.h" @@ -33,7 +34,6 @@ class cWorld; -class cReferenceManager; class cClientHandle; class cPlayer; class cChunk; @@ -373,9 +373,6 @@ protected: /// The entity which is attached to this entity (rider), NULL if none cEntity * m_Attachee; - cReferenceManager* m_Referencers; - cReferenceManager* m_References; - // Flags that signal that we haven't updated the clients with the latest. bool m_bDirtyHead; bool m_bDirtyOrientation; @@ -416,11 +413,6 @@ protected: void SetWorld(cWorld * a_World) { m_World = a_World; } - friend class cReferenceManager; - void AddReference( cEntity*& a_EntityPtr ); - void ReferencedBy( cEntity*& a_EntityPtr ); - void Dereference( cEntity*& a_EntityPtr ); - private: // Measured in degrees, [-180, +180) double m_HeadYaw; |