Skip to content

Commit

Permalink
Satisy Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyunge committed Apr 17, 2024
1 parent 3739027 commit 4844ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/entities/acf_engine_update/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ function ENT:CalcRPM(SelfTbl)
GearboxRPM = GearboxRPM / GearboxCount
-- GearboxLoad = GearboxLoad / GearboxCount
end

-- Calculate Engine Vacuum
SelfTbl.EngineBrakeTorque = SelfTbl.Displacement * (SelfTbl.FlyRPM / 60) * (1 - Throttle)

Expand All @@ -790,7 +790,7 @@ function ENT:CalcRPM(SelfTbl)
-- Calculate Engine Speed @ Gearbox Load
local SpeedDifference = math.max(0,GearboxRPM) - SelfTbl.FlyRPM

local EngineSpeed_Loaded = math.Clamp( ( (SpeedDifference / 6) / SelfTbl.Inertia ), -SelfTbl.PeakTorque, SelfTbl.PeakTorque )
local EngineSpeed_Loaded = math.Clamp( (SpeedDifference / 6) / SelfTbl.Inertia, -SelfTbl.PeakTorque, SelfTbl.PeakTorque )

-- Mix Unloaded & Loaded Engine Speeds.
local EngineSpeed = ( EngineSpeed_NoLoad * ( 1 - GearboxLoad ) ) + ( EngineSpeed_Loaded * GearboxLoad )
Expand Down

0 comments on commit 4844ca6

Please sign in to comment.