I just realized that VehicleScoringInfo.getGapsBehindLeader, when byClass is false, actually returns the number of laps behind the next car in front, not the leader (so in fact it works the same as VehicleScoringInfo.getLapsBehindNextInFront(false)):
public final int getLapsBehindLeader(boolean byClass) {
if (byClass) {
this.scoringInfo.updateClassScoring();
return this.lapsBehindLeaderByClass;
}
return this.data.getLapsBehindNextInFront();
}
I tried fixing this by changing it to
public final int getLapsBehindLeader(boolean byClass) {
if (byClass) {
this.scoringInfo.updateClassScoring();
return this.lapsBehindLeaderByClass;
}
return this.data.getLapsBehindLeader();
}
but this doesn't work. It has something to do with the implementation of the abstract class _VehicleScoringInfoCapsule, I think, but I don't understand enough about the code to be sure.
I just realized that VehicleScoringInfo.getGapsBehindLeader, when byClass is false, actually returns the number of laps behind the next car in front, not the leader (so in fact it works the same as VehicleScoringInfo.getLapsBehindNextInFront(false)):
I tried fixing this by changing it to
but this doesn't work. It has something to do with the implementation of the abstract class _VehicleScoringInfoCapsule, I think, but I don't understand enough about the code to be sure.