mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 03:12:18 -05:00
Better fix for blank hint issue. (#4070)
This commit is contained in:
parent
99fbecd951
commit
65c5806333
@ -964,7 +964,12 @@ static void DistributeHints(std::vector<uint8_t>& selected, size_t stoneCount, s
|
||||
for (uint8_t distribution = 0; distribution < distTable.size(); distribution++){
|
||||
currentWeight -= distTable[distribution].weight;
|
||||
if (currentWeight <= 0){
|
||||
if (stoneCount >= distTable[distribution].copies || distTable[distribution].copies == 0){
|
||||
if (distTable[distribution].copies == 0) {
|
||||
// This should only happen if we ran out of locations to place hints of a certain distribution earlier. Skip
|
||||
// to the next distribution.
|
||||
break;
|
||||
}
|
||||
if (stoneCount >= distTable[distribution].copies){
|
||||
selected[distribution] += 1;
|
||||
stoneCount -= distTable[distribution].copies;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user