From b72f40ccba9a41bda9dbaf75e7316e0942ba426d Mon Sep 17 00:00:00 2001 From: thecraftianman <64441307+thecraftianman@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:35:51 -0500 Subject: [PATCH] Ignore WAC seats in legal checks Is there a better way to ensure compatibility with other addons while still preventing arbitrary vehicles from being used to avoid the legal checks? Idk --- lua/acf/contraption/seats_sv.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/acf/contraption/seats_sv.lua b/lua/acf/contraption/seats_sv.lua index d8dc64544..156fa968f 100644 --- a/lua/acf/contraption/seats_sv.lua +++ b/lua/acf/contraption/seats_sv.lua @@ -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 @@ -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) \ No newline at end of file