summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-09 07:34:37 +0000
committertron <tron@openttd.org>2006-02-09 07:34:37 +0000
commit4f0ff156e8d3c82fcb15531776ea768dab44d74b (patch)
tree9dc192cd1278b0458f45712ec186e071d74560d3
parente407ced5378f9a02a2b52675a44e93829019ad97 (diff)
downloadopenttd-4f0ff156e8d3c82fcb15531776ea768dab44d74b.tar.xz
(svn r3583) Fix 2 glitches in r3556
-rw-r--r--tree_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tree_cmd.c b/tree_cmd.c
index cf9727607..31c010f72 100644
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -162,7 +162,7 @@ int32 CmdPlantTree(int ex, int ey, uint32 flags, uint32 p1, uint32 p2)
switch (GetTileType(tile)) {
case MP_TREES:
// no more space for trees?
- if (_game_mode != GM_EDITOR && GetTreeCount(tile) != 3) {
+ if (_game_mode != GM_EDITOR && GetTreeCount(tile) == 3) {
_error_message = STR_2803_TREE_ALREADY_HERE;
continue;
}
@@ -215,6 +215,7 @@ int32 CmdPlantTree(int ex, int ey, uint32 flags, uint32 p1, uint32 p2)
SetFenceSW(tile, 0);
SetTreeCount(tile, 0);
SetTreeGrowth(tile, _game_mode == GM_EDITOR ? 3 : 0);
+ MarkTileDirtyByTile(tile);
if (_game_mode == GM_EDITOR && IS_INT_INSIDE(treetype, TR_RAINFOREST, TR_CACTUS))
SetMapExtraBits(tile, 2);