Fixed a bug in crafting recipes - would consume multiple items of asterisked ingredients (FS #205)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@593 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
6bf5fa0d88
commit
429ccb59b5
@ -457,7 +457,9 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
|
|||||||
EndY = itrS->y;
|
EndY = itrS->y;
|
||||||
}
|
}
|
||||||
bool Found = false;
|
bool Found = false;
|
||||||
for (int x = StartX; x <= EndX; x++) for (int y = StartY; y <= EndY; y++)
|
for (int x = StartX; x <= EndX; x++)
|
||||||
|
{
|
||||||
|
for (int y = StartY; y <= EndY; y++)
|
||||||
{
|
{
|
||||||
if (HasMatched[x][y])
|
if (HasMatched[x][y])
|
||||||
{
|
{
|
||||||
@ -480,7 +482,12 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
|
|||||||
MatchedSlots.back().y = y;
|
MatchedSlots.back().y = y;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // for y, for x - "anywhere"
|
} // for y
|
||||||
|
if (Found)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} // for x
|
||||||
if (!Found)
|
if (!Found)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user