diff options
| author | Quietust | 2012-03-29 19:05:53 -0500 |
|---|---|---|
| committer | Quietust | 2012-03-29 19:05:53 -0500 |
| commit | 6a7e7241b8f3dd80a999d172cfc2572d8f58ec99 (patch) | |
| tree | dab5ecea6dcd8f4ea35c7e519bf9ae6d11981a92 /plugins/changevein.cpp | |
| parent | 07bb51946f96006190f34b0057cec29661e18aa2 (diff) | |
| download | dfhack-6a7e7241b8f3dd80a999d172cfc2572d8f58ec99.tar.gz dfhack-6a7e7241b8f3dd80a999d172cfc2572d8f58ec99.tar.bz2 dfhack-6a7e7241b8f3dd80a999d172cfc2572d8f58ec99.tar.xz | |
Fix bug in changevein - if multiple veins overlap the same tile, pick the LAST one rather than the first one
Diffstat (limited to 'plugins/changevein.cpp')
| -rw-r--r-- | plugins/changevein.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/changevein.cpp b/plugins/changevein.cpp index 5b8d2e98..133d7ef4 100644 --- a/plugins/changevein.cpp +++ b/plugins/changevein.cpp @@ -63,10 +63,9 @@ command_result df_changevein (color_ostream &out, vector <string> & 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) { |
