16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 11:39:19 +02:00

car route scanning accuracy improvement, AI coasting logic tweaks, AI car braking fix

This commit is contained in:
tmj-fstate
2018-08-11 01:42:22 +02:00
parent cbaa5f7817
commit 5e52467746
3 changed files with 79 additions and 68 deletions

View File

@@ -539,6 +539,16 @@ private:
return iAxleFirst ?
Axle1.pPosition :
Axle0.pPosition; };
/*
// TODO: check if scanning takes into account direction when selecting axle
// if it does, replace the version above
// if it doesn't, fix it so it does
inline Math3D::vector3 AxlePositionGet() {
return (
iDirection ?
( iAxleFirst ? Axle1.pPosition : Axle0.pPosition ) :
( iAxleFirst ? Axle0.pPosition : Axle1.pPosition ) ); }
*/
inline Math3D::vector3 VectorFront() const {
return vFront; };
inline Math3D::vector3 VectorUp() const {
@@ -555,6 +565,8 @@ private:
return MoverParameters->Dim.L; };
inline double GetWidth() const {
return MoverParameters->Dim.W; };
// calculates distance between event-starting axle and front of the vehicle
double tracing_offset() const;
inline TTrack * GetTrack() {
return (iAxleFirst ?
Axle1.GetTrack() :