diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-25 19:22:46 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-25 19:22:46 +0200 |
commit | dd423a2467f39550d7f54ef8e22a1089793ea7d4 (patch) | |
tree | a13a8d59404456a9c28b4c6d93f68851d03ffbcb /src/Entities | |
parent | Fixed wrong Surrounding size (diff) | |
parent | Redstone: Fixed a crash with repeaters on a chunk border. (diff) | |
download | cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar.gz cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar.bz2 cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar.lz cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar.xz cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.tar.zst cuberite-dd423a2467f39550d7f54ef8e22a1089793ea7d4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/HangingEntity.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Entities/HangingEntity.cpp b/src/Entities/HangingEntity.cpp index e789f5f18..3276bc4a0 100644 --- a/src/Entities/HangingEntity.cpp +++ b/src/Entities/HangingEntity.cpp @@ -43,11 +43,17 @@ void cHangingEntity::SpawnOn(cClientHandle & a_ClientHandle) // The client uses different values for item frame directions and block faces. Our constants are for the block faces, so we convert them here to item frame faces switch (m_BlockFace) { - case BLOCK_FACE_ZP: break; // Initialised to zero + case BLOCK_FACE_ZP: Dir = 0; break; case BLOCK_FACE_ZM: Dir = 2; break; case BLOCK_FACE_XM: Dir = 1; break; case BLOCK_FACE_XP: Dir = 3; break; - default: ASSERT(!"Unhandled block face when trying to spawn item frame!"); return; + default: + { + LOGINFO("Invalid face (%d) in a cHangingEntity at {%d, %d, %d}, adjusting to BLOCK_FACE_XP.", + m_BlockFace, (int)GetPosX(), (int)GetPosY(), (int)GetPosZ() + ); + Dir = 3; + } } if ((Dir == 0) || (Dir == 2)) // Probably a client bug, but two directions are flipped and contrary to the norm, so we do -180 |