From 6a7e7241b8f3dd80a999d172cfc2572d8f58ec99 Mon Sep 17 00:00:00 2001 From: Quietust Date: Thu, 29 Mar 2012 19:05:53 -0500 Subject: [PATCH] Fix bug in changevein - if multiple veins overlap the same tile, pick the LAST one rather than the first one --- plugins/changevein.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/changevein.cpp b/plugins/changevein.cpp index 5b8d2e982..133d7ef4a 100644 --- a/plugins/changevein.cpp +++ b/plugins/changevein.cpp @@ -63,10 +63,9 @@ command_result df_changevein (color_ostream &out, vector & parameters) df::block_square_event *evt = block->block_events[j]; if (evt->getType() != block_square_event_type::mineral) continue; - mineral = (df::block_square_event_mineralst *)evt; - if (mineral->getassignment(tx, ty)) - break; - mineral = NULL; + df::block_square_event_mineralst *cur = (df::block_square_event_mineralst *)evt; + if (cur->getassignment(tx, ty)) + mineral = cur; } if (!mineral) {