aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mapnode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 4afa91983..fe9686f0d 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -163,6 +163,9 @@ void MapNode::rotateAlongYAxis(INodeDefManager *nodemgr, Rotation rot) {
ContentParamType2 cpt2 = nodemgr->get(*this).param_type_2;
if (cpt2 == CPT2_FACEDIR) {
+ if (param2 >= 4)
+ return;
+
u8 newrot = param2 & 3;
param2 &= ~3;
param2 |= (newrot + rot) & 3;