projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aef1b41
)
RotateAlongYAxis: For facedir case, return if param2 >= 4
author
paramat
<mat.gregory@virginmedia.com>
Sun, 3 May 2015 01:44:58 +0000
(
02:44
+0100)
committer
paramat
<mat.gregory@virginmedia.com>
Sun, 3 May 2015 02:43:51 +0000
(
03:43
+0100)
src/mapnode.cpp
patch
|
blob
|
history
diff --git
a/src/mapnode.cpp
b/src/mapnode.cpp
index 4afa91983b19917b8f2db9d7888f7838ce45dc52..fe9686f0d3f0fe07e583164cdeb07a012029fd71 100644
(file)
--- 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;