summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-03 19:34:07 +0000
committerdarkvater <darkvater@openttd.org>2005-01-03 19:34:07 +0000
commit5b6be8858700950c8d16e0698259b3d32f7c0ce8 (patch)
tree4402b5e0d7492d3d28b1fdf442888276a6767d05
parent79d29b7633da52647b7ad4a36fb016ee0cf13801 (diff)
downloadopenttd-5b6be8858700950c8d16e0698259b3d32f7c0ce8.tar.xz
(svn r1347) -Fix: Some were fixed for the trees -> Only copy the lowest two bits (amount of snow/desert) from map5 to map2 when placing trees, before this happened implicitly because map2 was just 8 bits wide;
-rw-r--r--tree_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tree_cmd.c b/tree_cmd.c
index 5fdf4e22c..e5067e612 100644
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -202,7 +202,7 @@ int32 CmdPlantTree(int ex, int ey, uint32 flags, uint32 p1, uint32 p2)
if ( (ti.map5 & 0x1C) == 4 ) {
m2 = 16;
} else if ( (ti.map5 & 0x1C) == 16 ) {
- m2 = (ti.map5 << 6) | 0x20;
+ m2 = ((ti.map5 & 3) << 6) | 0x20;
}
treetype = p1;
@@ -609,7 +609,7 @@ void OnTick_Trees()
} else if (m == 4) {
m2 = 0x10;
} else {
- m2 = (_map5[tile] << 6) | 0x20;
+ m2 = ((_map5[tile] & 3) << 6) | 0x20;
}
ModifyTile(tile,