Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created December 27, 2014 01:34
Show Gist options
  • Save kahrl/d0a106bd79ddd0b8f2e2 to your computer and use it in GitHub Desktop.
Save kahrl/d0a106bd79ddd0b8f2e2 to your computer and use it in GitHub Desktop.
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 4e8feb0..25f7074 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -119,7 +119,7 @@ u8 MapNode::getFaceDir(INodeDefManager *nodemgr) const
{
const ContentFeatures &f = nodemgr->get(*this);
if(f.param_type_2 == CPT2_FACEDIR)
- return getParam2() & 0x1F;
+ return (getParam2() & 0x1F) % 24;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment