Jump to content

[41.73] Engine power isn't used


Taeo

Recommended Posts

	• Version? 41.73
	• Singleplayer/Multiplayer? Tested only in MP
	• Host or dedicated? Both
	• Mods? CheatMenu
	• Old or new save? Both
	• Reproduction steps: 
1. Use whatever tool you have on hand to give a vehicle a really low engine power, like 1hp. 
   I used CheatMenu, then a little custom mod, to the same effect.
2. Drive forward, should drive normally
3. Try to reverse. Should be unable to
4. revert the engine power, now reverse works as normal

If I root around in CarController.control_ForwardNew(), which I think is the code handling forward momentum, I notice the EngineForce is initially set to vehicle.getEnginePower(), but then is immediately overwritten with vehicle.getScript().getEngineForce(), at least when looking at a decompiled version. I suspect this is the cause of the vehicle being able to drive forward no matter its current "enginepower", and why enginepower reductions from poor engine quality simply don't do anything:

 

Its being overwritten by the default value in the vehicle script

Edited by Taeo
formatting issues
Link to comment
Share on other sites

I hope so. Was trying to make a vehicle mod and was very frustrated to find I have no control over the perceived power of a vehicle without making it weigh nothing and dealing with the consequences of that, lol

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...