summaryrefslogtreecommitdiffstats
path: root/source/Entity.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 11:59:59 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 11:59:59 +0100
commitee34d805bebe7826fb6cae9a350c625974c4bd74 (patch)
tree12c2c068f32c5116c3d116936119b5e1e286db8b /source/Entity.cpp
parentFixed a crash in redstone simulator when destroying blocks in Y < 2 (diff)
downloadcuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar.gz
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar.bz2
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar.lz
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar.xz
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.tar.zst
cuberite-ee34d805bebe7826fb6cae9a350c625974c4bd74.zip
Diffstat (limited to 'source/Entity.cpp')
-rw-r--r--source/Entity.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/Entity.cpp b/source/Entity.cpp
index 9bc0b3ae2..e5e6061e5 100644
--- a/source/Entity.cpp
+++ b/source/Entity.cpp
@@ -22,7 +22,7 @@ cCriticalSection cEntity::m_CSCount;
-cEntity::cEntity(const double & a_X, const double & a_Y, const double & a_Z)
+cEntity::cEntity(double a_X, double a_Y, double a_Z)
: m_UniqueID( 0 )
, m_Referencers( new cReferenceManager( cReferenceManager::RFMNGR_REFERENCERS ) )
, m_References( new cReferenceManager( cReferenceManager::RFMNGR_REFERENCES ) )
@@ -57,9 +57,9 @@ cEntity::~cEntity()
this
);
- if( !m_bDestroyed || !m_bRemovedFromChunk )
+ if (!m_bDestroyed || !m_bRemovedFromChunk)
{
- LOGERROR("ERROR: Entity deallocated without being destroyed %i or unlinked %i", m_bDestroyed, m_bRemovedFromChunk );
+ LOGERROR("ERROR: Entity deallocated without being destroyed %i or unlinked %i", m_bDestroyed, m_bRemovedFromChunk);
ASSERT(!"Entity deallocated without being destroyed or unlinked");
}
delete m_Referencers;
@@ -269,9 +269,9 @@ void cEntity::SetPosition( const Vector3d & a_Pos )
-void cEntity::SetPosition( const double & a_PosX, const double & a_PosY, const double & a_PosZ )
+void cEntity::SetPosition(double a_PosX, double a_PosY, double a_PosZ)
{
- m_Pos.Set( a_PosX, a_PosY, a_PosZ );
+ m_Pos.Set(a_PosX, a_PosY, a_PosZ);
MoveToCorrectChunk();
m_bDirtyPosition = true;
}
@@ -280,7 +280,7 @@ void cEntity::SetPosition( const double & a_PosX, const double & a_PosY, const d
-void cEntity::SetPosX( const double & a_PosX )
+void cEntity::SetPosX(double a_PosX)
{
m_Pos.x = a_PosX;
MoveToCorrectChunk();
@@ -291,7 +291,7 @@ void cEntity::SetPosX( const double & a_PosX )
-void cEntity::SetPosY( const double & a_PosY )
+void cEntity::SetPosY(double a_PosY)
{
m_Pos.y = a_PosY;
MoveToCorrectChunk();
@@ -302,7 +302,7 @@ void cEntity::SetPosY( const double & a_PosY )
-void cEntity::SetPosZ( const double & a_PosZ )
+void cEntity::SetPosZ(double a_PosZ)
{
m_Pos.z = a_PosZ;
MoveToCorrectChunk();
@@ -315,7 +315,7 @@ void cEntity::SetPosZ( const double & a_PosZ )
//////////////////////////////////////////////////////////////////////////
// Reference stuffs
-void cEntity::AddReference( cEntity*& a_EntityPtr )
+void cEntity::AddReference(cEntity * & a_EntityPtr)
{
m_References->AddReference( a_EntityPtr );
a_EntityPtr->ReferencedBy( a_EntityPtr );
@@ -325,7 +325,7 @@ void cEntity::AddReference( cEntity*& a_EntityPtr )
-void cEntity::ReferencedBy( cEntity*& a_EntityPtr )
+void cEntity::ReferencedBy(cEntity * & a_EntityPtr)
{
m_Referencers->AddReference( a_EntityPtr );
}
@@ -334,7 +334,7 @@ void cEntity::ReferencedBy( cEntity*& a_EntityPtr )
-void cEntity::Dereference( cEntity*& a_EntityPtr )
+void cEntity::Dereference(cEntity*& a_EntityPtr)
{
m_Referencers->Dereference( a_EntityPtr );
}