Skip to content

Commit

Permalink
Handle LVS/simfphys/WAC vehicles as squishy
Browse files Browse the repository at this point in the history
Closes #266
Related to #234
  • Loading branch information
thecraftianman committed Nov 21, 2024
1 parent bc48f96 commit 819a6fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/acf/core/validation_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,16 @@ function ACF.CheckLegal(Entity)
return true
end

--- Determines the type of damage that should be dealt to the given entity.
--- @param Entity entity The entity to be checked
--- @return string # The type of damage that ACF should deal to the entity
function ACF.GetEntityType(Entity)
if Entity:IsPlayer() or Entity:IsNPC() or Entity:IsNextBot() then return "Squishy" end

-- Explicitly handle support for LVS/simfphys/WAC
local EntTbl = Entity:GetTable()
if EntTbl.LVS or EntTbl.IsSimfphyscar or EntTbl.isWacAircraft then return "Squishy" end

if Entity:IsVehicle() then return "Vehicle" end

return "Prop"
Expand Down

0 comments on commit 819a6fc

Please sign in to comment.