-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make electric motors go in reverse better
Due to the downscaling of reverse power/speed for vehicle engines, it can happen that a vehicle is so heavy, it can move forward but not backward. Because battery-powered electric motors can turn in either direction with equal speed and torque, vehicles with electric motors should be exempt from the power-reduction for reverse speeds. This commit adds a new `vehicle::max_reverse_velocity` function as the counterpart to `vehicle::max_velocity`, where an exception is made for battery-powered motors. Here I suppose is where the maximum reverse speed multiplier for horses, bicycles, and jet turbines would eventually be made; for now it just checks for battery-powered motors. Note, how *much* the motor is contributing to overall torque is not calculated; the simple presence of any electric motor in the drivetrain (no matter how small) ought to negate the reverse-power penalty. Fixed #38165
- Loading branch information
Showing
3 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters