summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/HangingEntity.cpp15
-rw-r--r--src/Entities/HangingEntity.h2
2 files changed, 16 insertions, 1 deletions
diff --git a/src/Entities/HangingEntity.cpp b/src/Entities/HangingEntity.cpp
index 6e9a89550..3276bc4a0 100644
--- a/src/Entities/HangingEntity.cpp
+++ b/src/Entities/HangingEntity.cpp
@@ -21,6 +21,21 @@ cHangingEntity::cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace,
+void cHangingEntity::SetDirection(eBlockFace a_BlockFace)
+{
+ if ((a_BlockFace < 2) || (a_BlockFace > 5))
+ {
+ ASSERT(!"Tried to set a bad direction!");
+ return;
+ }
+
+ m_BlockFace = a_BlockFace;
+}
+
+
+
+
+
void cHangingEntity::SpawnOn(cClientHandle & a_ClientHandle)
{
int Dir = 0;
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h
index 3593f9ede..455f2f23f 100644
--- a/src/Entities/HangingEntity.h
+++ b/src/Entities/HangingEntity.h
@@ -24,7 +24,7 @@ public:
eBlockFace GetDirection() const { return m_BlockFace; } // tolua_export
/** Set the orientation from the hanging entity */
- void SetDirection(eBlockFace a_BlockFace) { m_BlockFace = a_BlockFace; } // tolua_export
+ void SetDirection(eBlockFace a_BlockFace); // tolua_export
/** Returns the X coord. */
int GetTileX() const { return POSX_TOINT; } // tolua_export