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:
ce955f3
)
Fix wallmounted rotations along Y axis for 90 and 270 degree cases
author
kwolekr
<kwolekr@minetest.net>
Mon, 8 Jul 2013 22:50:29 +0000
(18:50 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Mon, 8 Jul 2013 22:50:29 +0000
(18:50 -0400)
src/mapnode.cpp
patch
|
blob
|
history
diff --git
a/src/mapnode.cpp
b/src/mapnode.cpp
index 388818c426b0366c6b200b2521805afcd8a56e9f..f9323118770a11178bb8d0357f201174b5489690 100644
(file)
--- a/
src/mapnode.cpp
+++ b/
src/mapnode.cpp
@@
-31,6
+31,7
@@
with this program; if not, write to the Free Software Foundation, Inc.,
static const Rotation wallmounted_to_rot[] = {
ROTATE_0, ROTATE_180, ROTATE_90, ROTATE_270
};
+
static const u8 rot_to_wallmounted[] = {
2, 4, 3, 5
};
@@
-154,7
+155,7
@@
void MapNode::rotateAlongYAxis(INodeDefManager *nodemgr, Rotation rot) {
Rotation oldrot = wallmounted_to_rot[wmountface - 2];
param2 &= ~7;
- param2 |= rot_to_wallmounted[(oldrot
+
rot) & 3];
+ param2 |= rot_to_wallmounted[(oldrot
-
rot) & 3];
}
}