diff options
author | paramat <mat.gregory@virginmedia.com> | 2015-05-03 02:44:58 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2015-05-03 03:43:51 +0100 |
commit | 9e1e4b62844f736449ce53be7a87a769bf35d834 (patch) | |
tree | a9830ba1f00e342dfc3c43f505da23a03c44f16b /src | |
parent | aef1b41b021a41a85ddd83d9ba33cfe9abc0b19d (diff) | |
download | minetest-9e1e4b62844f736449ce53be7a87a769bf35d834.tar.gz minetest-9e1e4b62844f736449ce53be7a87a769bf35d834.tar.bz2 minetest-9e1e4b62844f736449ce53be7a87a769bf35d834.zip |
RotateAlongYAxis: For facedir case, return if param2 >= 4
Diffstat (limited to 'src')
-rw-r--r-- | src/mapnode.cpp | 3 |
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; |