voxeltycoon / issues

18 stars 4 forks source link

Wrong slope force calculation for flipped vehicles #890

Closed xmnovotny closed 2 years ago

xmnovotny commented 3 years ago

When vehicle is flipped, slope force (and acceleration/power needed) is calculated as on opposite direction - going downhill will slow down the vehicle and vice versa.

Steps to reproduce Build long slope, long doubleheaded train and observe speed, acceleration and power needed for going uphill and downhill after whole train reverse its direction.

Build version 0.86.1.0

Platform Windows 10

Reproducibility Everytime

Fix In function Vehicle.GetSlopeForce multiply whole result by -1 when Vehicle.IsFlipped and subresults by -1 when VehicleUnit.IsFlipped

andrewpey commented 2 years ago

Thanks, will be fixed with 0.87.

andrewpey commented 2 years ago

The fix is live on the beta branch.