Skip to content

Commit

Permalink
Merge pull request #1475 from TeamOpenIndustry/crossing-fix
Browse files Browse the repository at this point in the history
Fixed Grade Crossing Math
  • Loading branch information
cam72cam authored Jun 8, 2024
2 parents bef835d + c5f023b commit 42c93ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public BuilderIterator(RailInfo info, World world, Vec3i pos, boolean endOfTrack
int posZ = (int)Math.floor(gagPos.z+nextUp.z+placeOff.z);
double height = 0;
if (info.settings.isGradeCrossing) {
height = (1 - Math.abs((int)q)/horiz)/3 - 0.05;
height = 0.306 - Math.abs(Math.round(q))/(3 * horiz);
height *= info.settings.gauge.scale();
height = Math.min(height, clamp);
}
Expand Down

0 comments on commit 42c93ca

Please sign in to comment.