Skip to content

Commit

Permalink
Fix vehicle switching direction
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
schliesser committed Jan 11, 2022
1 parent f16cb91 commit 184e842
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/AtbOverrides.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ function AtbOverrides:openShop(guiName)
end

-- check if vehicle switching is allowed
function AtbOverrides:onSwitchVehicle(_, _, directionValue)
if not self.isPlayerFrozen and self.isRunning then
if g_atb.settings:getValue(AtbSettings.SETTING.VEHICLE_TABBING) then
self:toggleVehicle(directionValue)
end
function AtbOverrides:onSwitchVehicle(superFunc, one, two, directionValue)
if g_atb.settings:getValue(AtbSettings.SETTING.VEHICLE_TABBING) then
superFunc(self, one, two, directionValue)
end
end

0 comments on commit 184e842

Please sign in to comment.