Skip to content

Conversation

forkerer
Copy link
Contributor

Fixes #731
Changing vehicle max gear in handling to lower than current gear used by vehicle resulted in infinite loop in CTransmission:CalculateDriveAcceleration (0x6D05E0), i added a simple check to the beginning of the function, that lowers the gear if it's above maximum limit. The game doesn't freeze anymore.
This snippet helps with testing it:

function veh(client)
	setVehicleHandling(getPedOccupiedVehicle(client), "numberOfGears", 1)
end
addCommandHandler( "veh", veh )

@forkerer forkerer added the bug Something isn't working label Jan 15, 2019
@Einheit-101
Copy link

This never happened to me and i changed many max gears on my server, strange.

@qaisjp qaisjp added this to the 1.5.7 milestone Feb 10, 2019
@qaisjp qaisjp self-assigned this Feb 10, 2019
Copy link
Contributor

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@qaisjp qaisjp merged commit 5035b7f into multitheftauto:master Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants