Skip to content
Permalink
Browse files

RotateAlongYAxis: For facedir case, return if param2 >= 4

  • Loading branch information
paramat committed May 3, 2015
1 parent aef1b41 commit 9e1e4b62844f736449ce53be7a87a769bf35d834
Showing with 3 additions and 0 deletions.
  1. +3 −0 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;

0 comments on commit 9e1e4b6

Please sign in to comment.