Skip to content

Commit

Permalink
Merge branch 'master' into hook-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Jan 13, 2024
2 parents f3f116c + b72f40c commit 70eb944
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/acf/contraption/seats_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hook.Add("OnEntityCreated", "ACF_SeatLegality", function(Entity)
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

local PhysObj = Entity:GetPhysicsObject()
if not IsValid(PhysObj) then return end
Expand Down Expand Up @@ -38,7 +39,7 @@ hook.Add("CanPlayerEnterVehicle", "ACF_SeatLegality", function(Player, Entity)
if not Entity.ACF then return end

if not Entity.ACF.LegalSeat then
ACF.SendNotify(Player, false, "Seat is not legal and is currently disabled.")
ACF.SendNotify(Player, false, "[ACF] Seat is not legal and is currently disabled.")
return false
end
end)

0 comments on commit 70eb944

Please sign in to comment.