(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;
authordarkvater
Mon, 03 Jan 2005 19:34:07 +0000
changeset 866 6a02d5c675ad
parent 865 789ce24b174f
child 867 581154a08a78
(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;
tree_cmd.c
--- a/tree_cmd.c	Mon Jan 03 19:09:45 2005 +0000
+++ b/tree_cmd.c	Mon Jan 03 19:34:07 2005 +0000
@@ -202,7 +202,7 @@
 					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 @@
 		} else if (m == 4) {
 			m2 = 0x10;
 		} else {
-			m2 = (_map5[tile] << 6) | 0x20;
+			m2 = ((_map5[tile] & 3) << 6) | 0x20;
 		}
 
 		ModifyTile(tile,