race: add new settings to control vehicle physics behavior #655
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds new settings that can be configured globally by the server or per map to control vehicle physics behavior. By default, they do not change the current behavior unless set in race or map settings. These settings were added to fix issues caused by multitheftauto/mtasa-blue#4243, which broke many custom maps and made them unfinishable. They allow server owners and mappers to bring back the old physics on specific maps by disabling the fix and setting the FPS those maps were designed for, without affecting other maps. The old behavior can also be enabled globally.
New settings:
vehicle_physics_mode
Controls physics behavior.
fixed
for FPS-independent physics, orlegacy
to restore the old behavior. Default isfixed
.vehicle_physics_fps
Sets the FPS limit when
vehicle_physics_mode
is set tolegacy
.-1
to keep the current limit, or set a specific FPS value. The original FPS limit is restored when the map or race resource stops. Default is-1
.vehicle_physics_mode_map_can_override
andvehicle_physics_fps_map_can_override
Allow maps to override the global
vehicle_physics_mode
andvehicle_physics_fps
values. Default istrue
.