Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Jan 30, 2024
2 parents 61e6b78 + 9181811 commit 8e60c0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/acf/contraption/seats_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ hook.Add("OnEntityCreated", "ACF_SeatLegality", function(Entity)
timer.Simple(0, function()
if not IsValid(Entity) then return end
if Entity:GetClass() ~= "prop_vehicle_prisoner_pod" then return end
if Entity.fphysSeat then return end -- simfphys vehicles will make non-solid seats that should be ignored
if Entity.wac_ignore then return end -- WAC vehicles do this too
if not Entity.VehicleTable then return end -- Some vehicles like simfphys/WAC/Sit Anywhere will make non-solid seats that should be ignored

local PhysObj = Entity:GetPhysicsObject()
if not IsValid(PhysObj) then return end
Expand All @@ -15,7 +14,7 @@ hook.Add("OnEntityCreated", "ACF_SeatLegality", function(Entity)
Entity.ACF.LegalMass = PhysObj:GetMass()
Entity.ACF.Model = Entity:GetModel()
Entity.ACF.LegalSeat = true
Entity.WireDebugName = Entity.WireDebugName or (Entity.VehicleTable and Entity.VehicleTable.Name) or "ACF Legal Vehicle"
Entity.WireDebugName = Entity.WireDebugName or Entity.VehicleTable.Name or "ACF Legal Vehicle"

Entity.Enable = function()
Entity.ACF.LegalSeat = true
Expand Down

0 comments on commit 8e60c0b

Please sign in to comment.