Skip to content

Commit

Permalink
Disable the vehicle horn when toggling engine.
Browse files Browse the repository at this point in the history
If the engine toggle key is still the default (vehicle horn) key, then the vehicle horn will be disabled whenever the 'toggle engine' prompt is visible.
  • Loading branch information
TomGrobbe committed Jan 28, 2019
1 parent 563d190 commit 2b0d720
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FRFuel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ public void ConsumeFuel(Vehicle vehicle)
/// <param name="vehicle"></param>
public void ControlEngine(Vehicle vehicle)
{
// Prevent the player from honking the horn whenever trying to toggle the engine.
if (engineToggleControl == Control.VehicleHorn)
Game.DisableControlThisFrame(0, Control.VehicleHorn);

if (Game.IsControlJustReleased(0, engineToggleControl) && !Game.IsControlPressed(0, Control.Jump))
{
if (vehicle.IsEngineRunning)
Expand Down

0 comments on commit 2b0d720

Please sign in to comment.