changeset 407:e6fd2f754a32 draft

(svn r604) -Fix: [ 999669 ] Wrong trees (toyland's) in sub-tropical landscape style Tree generation code sometimes set the non-existent growth state 7 This could also become manifest in snow covered trees below the swnow line in arctic climate and similar effects
author tron <tron@openttd.org>
date Sun, 14 Nov 2004 17:16:26 +0000
parents 5ad50fe9ae07
children c5c3c9caed02
files tree_cmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -36,7 +36,7 @@
 
 	if (tree >= 0) {
 		m5 = (byte)(r >> 16);
-		if(m5==7) m5--;
+		if ((m5 & 0x7) == 7) m5--; // there is no growth state 7
 
 		_map5[tile] = m5 & 0x07;	// growth state;
 		_map5[tile] |=  m5 & 0xC0;	// amount of trees