Fix bug in changevein - if multiple veins overlap the same tile, pick the LAST one rather than the first one

develop
Quietust 2012-03-29 19:05:53 -05:00
parent 07bb51946f
commit 6a7e7241b8
1 changed files with 3 additions and 4 deletions

@ -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)
{