From b152a40e836c652e6a18c93e17a5789d98d1409a Mon Sep 17 00:00:00 2001 From: Quietust Date: Mon, 13 Feb 2012 19:56:55 -0600 Subject: [PATCH] Fix remaining issues --- library/TileTypes.cpp | 2 +- plugins/getplants.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/TileTypes.cpp b/library/TileTypes.cpp index c31e948cb..55197de91 100644 --- a/library/TileTypes.cpp +++ b/library/TileTypes.cpp @@ -74,7 +74,7 @@ namespace DFHack // Run through until perfect match found or hit end. FOR_ENUM_ITEMS(tiletype, tt) { - if (value < (8|4|1)) + if (value == (8|4|1)) break; if (tileShape(tt) == tshape) { diff --git a/plugins/getplants.cpp b/plugins/getplants.cpp index 334923f18..4281a8e99 100644 --- a/plugins/getplants.cpp +++ b/plugins/getplants.cpp @@ -107,9 +107,9 @@ DFhackCExport command_result df_getplants (Core * c, vector & parameter } df::tiletype_shape shape = tileShape(cur->tiletype[x][y]); df::tiletype_special special = tileSpecial(cur->tiletype[x][y]); - if (plant->flags.bits.is_shrub && (treesonly || (shape != tiletype_shape::SHRUB && special != tiletype_special::DEAD))) + if (plant->flags.bits.is_shrub && (treesonly || !(shape == tiletype_shape::SHRUB && special != tiletype_special::DEAD))) continue; - if (!plant->flags.bits.is_shrub && (shrubsonly || shape != tiletype_shape::TREE)) + if (!plant->flags.bits.is_shrub && (shrubsonly || !(shape == tiletype_shape::TREE))) continue; if (cur->designation[x][y].bits.hidden) continue;