FCNPC
FCNPC copied to clipboard
FCNPC_GoByMovePath Bug
Train not moving correctly with FCNPC https://www.youtube.com/watch?v=SE3OA8u2QZA
We should set right CVehicleSyncData->fTrainSpeed value to fix this. For now I don't know how to calculate it.
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:
- Setting float speed to 1.0 makes train go 100mph/160kmh
- 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)