Fix the jail pay calculation.

There was a problem where if someone was fixing to get released, aka 0
milliseconds remaining, then we would charge them for infinite jailing.
This commit is contained in:
graywolf336 2014-08-19 13:54:13 -05:00
parent 196b7c33ed
commit 24c6d31742

View File

@ -54,7 +54,7 @@ public class JailPayManager {
* @return The economy cost the prisoner will need to pay to get completely free.
*/
public double calculateBill(Prisoner prisoner) {
return prisoner.getRemainingTime() > 0 ? prisoner.getRemainingTimeInMinutes() * this.minteCost : infiniteCost;
return prisoner.getRemainingTime() >= 0 ? prisoner.getRemainingTimeInMinutes() * this.minteCost : infiniteCost;
}
/** Gets how many minutes someone is paying for (rounds to the lowest number). */