diff options
author | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
commit | 94dc3e19fe36d8256c67716a6cac2fbf369320c8 (patch) | |
tree | 060d1b7203b9454eb4c6fbfe086724f383ec6899 /src/Entities | |
parent | Merge pull request #2172 from mc-server/LightingCallbacks (diff) | |
parent | Fixed warnings in MSVC. (diff) | |
download | cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.gz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.bz2 cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.lz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.xz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.zst cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/HangingEntity.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h index 4d70cd1a0..5d0aa17b3 100644 --- a/src/Entities/HangingEntity.h +++ b/src/Entities/HangingEntity.h @@ -46,6 +46,9 @@ public: protected: + Byte m_Facing; + + virtual void SpawnOn(cClientHandle & a_ClientHandle) override; virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override { @@ -53,6 +56,7 @@ protected: UNUSED(a_Chunk); } + /** Converts protocol hanging item facing to eBlockFace values */ inline static eBlockFace ProtocolFaceToBlockFace(Byte a_ProtocolFace) { @@ -77,6 +81,7 @@ protected: return Dir; } + /** Converts eBlockFace values to protocol hanging item faces */ inline static Byte BlockFaceToProtocolFace(eBlockFace a_BlockFace) { @@ -99,13 +104,17 @@ protected: Dir = cHangingEntity::BlockFaceToProtocolFace(BLOCK_FACE_XP); } + #if !defined(__clang__) + default: + { + ASSERT(!"Unknown BLOCK_FACE"); + return 0; + } + #endif } return Dir; } - - Byte m_Facing; - }; // tolua_export |