FCNPC icon indicating copy to clipboard operation
FCNPC copied to clipboard

FCNPC_GoByMovePath Bug

Open AbyssMorgan opened this issue 7 years ago • 2 comments

Train not moving correctly with FCNPC https://www.youtube.com/watch?v=SE3OA8u2QZA

AbyssMorgan avatar Nov 30 '17 20:11 AbyssMorgan

We should set right CVehicleSyncData->fTrainSpeed value to fix this. For now I don't know how to calculate it.

ziggi avatar Jan 04 '18 22:01 ziggi

I think MTA or RNPC can help. MTA with source code and RNPC with .rec file structure. From what i have seen in MTA source code, they apply train speed directly as float passed from lua.

And lua docs tell us two things:

  1. Setting float speed to 1.0 makes train go 100mph/160kmh
  2. Setting negative value will make train go in opposite direction (counter clockwise)

I dont have time to code, compile and test but i guess there is no harm if someone just add's Get/SetTrainSpeed functions (c++ and export natives) that would allow range from -2.0 to 2.0 (that is 200mph and should be almost as fast as Bullet vehicle in SA if im not mistaken)

BitFros7y avatar Mar 06 '18 21:03 BitFros7y