Skip to content

Commit

Permalink
Fixed rare case of crop growth rate being a negative value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kittychanley committed May 18, 2016
1 parent 7b22189 commit 7bc2022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/com/bioxx/tfc/TileEntities/TECrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ else if(crop.dormantInFrost && ambientTemp < crop.minAliveTemp)
tef.drainNutrients(3, crop.nutrientUsageMult);
}

float growthRate = (((crop.numGrowthStages / (crop.growthTime * TFC_Time.timeRatio96) + tempAdded) * nutriMult) * timeMultiplier) * TFCOptions.cropGrowthMultiplier;
float growthRate = Math.max(0.0f, (((crop.numGrowthStages / (crop.growthTime * TFC_Time.timeRatio96) + tempAdded) * nutriMult) * timeMultiplier) * TFCOptions.cropGrowthMultiplier);
if(tef!= null && tef.isInfested)
growthRate /= 2;
int oldGrowth = (int) Math.floor(growth);
Expand Down

0 comments on commit 7bc2022

Please sign in to comment.