horse: use straight front type in racecourse api
This commit is contained in:
+3
-4
@@ -139,9 +139,8 @@ func spansslopes(id horse.RacecourseID, evts []courseEvent, length float32) ([]h
|
||||
}
|
||||
// Start of the straight.
|
||||
span = horse.RacecourseSpan{
|
||||
Start: evt.Distance,
|
||||
Straight: true,
|
||||
FarStraight: evt.Values[1] == 2,
|
||||
Start: evt.Distance,
|
||||
Straight: int8(evt.Values[1]),
|
||||
}
|
||||
// Continue out of the switch.
|
||||
}
|
||||
@@ -154,7 +153,7 @@ func spansslopes(id horse.RacecourseID, evts []courseEvent, length float32) ([]h
|
||||
// Longchamp 1000 (which doesn't appear to actually be used but w/e)
|
||||
// defines straights by their start positions only, so check for the
|
||||
// previous event being a straight with no end.
|
||||
if prev.Straight && prev.End == 0 {
|
||||
if prev.Straight != 0 && prev.End == 0 {
|
||||
spans[len(spans)-1].End = span.Start
|
||||
} else {
|
||||
// Otherwise, insert a new span which is neither straight nor corner.
|
||||
|
||||
Reference in New Issue
Block a user