Skip to content

Commit

Permalink
Block "Disable Collisions" property on tanks
Browse files Browse the repository at this point in the history
  • Loading branch information
StyledStrike committed Dec 24, 2024
1 parent 64541b7 commit 1152ed2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/glide/server/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ hook.Add( "CanEditVariable", "Glide.ValidateEditVariables", function( ent, _, _,
end
end )

-- Block "Disable Collisions" option on tanks
hook.Add( "CanProperty", "block_remover_property", function( ply, property, ent )
if not ply:IsAdmin() and property == "collision" and ent.VehicleType == Glide.VEHICLE_TYPE.TANK then
return false
end
end )

hook.Add( "EntityTakeDamage", "Glide.OverrideDamage", function( target, dmginfo )
-- Don't let missiles deal crush damage
local inflictor = dmginfo:GetInflictor()
Expand Down

0 comments on commit 1152ed2

Please sign in to comment.