Skip to content

Commit

Permalink
RotateAlongYAxis: For facedir case, return if param2 >= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed May 3, 2015
1 parent aef1b41 commit 9e1e4b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mapnode.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9e1e4b6

Please sign in to comment.