Allowed fractional health deductions per frame
- Fixed boundary penalty system #story[1291]
This commit is contained in:
@@ -378,8 +378,8 @@ public class MockRace extends RaceState {
|
||||
}
|
||||
|
||||
// Remove one unit of health for every frame spent outside boundary
|
||||
if(!finish && checkBearingInsideCourse(boat.getBearing(), boat.getPosition())) {
|
||||
boat.updateHealth(-1);
|
||||
if(!finish && !GPSCoordinate.isInsideBoundary(boat.getPosition(), getBoundary())) {
|
||||
boat.updateHealth(-0.1);
|
||||
}
|
||||
|
||||
this.updateEstimatedTime(boat);
|
||||
|
||||
@@ -273,7 +273,7 @@ public class RaceServer {
|
||||
private BoatState parseIndividualBoatState(MockBoat boat) {
|
||||
return new BoatState(
|
||||
boat.getSourceID(),
|
||||
boat.getHealth()
|
||||
(int)boat.getHealth()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user