summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-14 12:06:48 +0200
committermadmaxoft <github@xoft.cz>2014-06-14 12:06:48 +0200
commitf8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b (patch)
treed2f3e35f37821e93d92143db2055bcedeaf57142 /src/Entities/Entity.h
parentPlayer.h: Moved doxy-comments to Entity.h (diff)
parentFixed a repeater issue (diff)
downloadcuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.gz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.bz2
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.lz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.xz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.zst
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index ecd26b194..fed856b30 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -146,8 +146,9 @@ public:
cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, double a_Width, double a_Height);
virtual ~cEntity();
- /// Spawns the entity in the world; returns true if spawned, false if not (plugin disallowed)
- virtual bool Initialize(cWorld * a_World);
+ /** Spawns the entity in the world; returns true if spawned, false if not (plugin disallowed).
+ Adds the entity to the world. */
+ virtual bool Initialize(cWorld & a_World);
// tolua_begin
@@ -434,6 +435,9 @@ public:
UNUSED(a_Killer);
}
+ /** Sets the internal world pointer to a new cWorld, doesn't update anything else. */
+ void SetWorld(cWorld * a_World) { m_World = a_World; }
+
protected:
static cCriticalSection m_CSCount;
static int m_EntityCount;
@@ -498,8 +502,6 @@ protected:
virtual void Destroyed(void) {} // Called after the entity has been destroyed
- void SetWorld(cWorld * a_World) { m_World = a_World; }
-
/** Called in each tick to handle air-related processing i.e. drowning */
virtual void HandleAir();