Skip to content

Commit

Permalink
prevent entity gates from being used on players
Browse files Browse the repository at this point in the history
  • Loading branch information
Aws0mee authored Nov 25, 2023
1 parent 3764d10 commit 22272a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/wire/gates/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ GateActions["entity_applyf"] = {
timed = true,
output = function(gate, ent, vec )
if not IsValid( ent ) then return end
if ent:IsPlayer() then return end
local phys = ent:GetPhysicsObject()
if not IsValid( phys ) then return end
if not isAllowed( gate, ent ) then return end
Expand All @@ -39,6 +40,7 @@ GateActions["entity_applyof"] = {
timed = true,
output = function(gate, ent, vec, offset )
if not IsValid( ent ) then return end
if ent:IsPlayer() then return end
local phys = ent:GetPhysicsObject()
if not IsValid( phys ) then return end
if not isAllowed( gate, ent ) then return end
Expand All @@ -64,6 +66,7 @@ GateActions["entity_applyaf"] = {
timed = true,
output = function(gate, ent, angForce )
if not IsValid( ent ) then return end
if ent:IsPlayer() then return end
local phys = ent:GetPhysicsObject()
if not IsValid( phys ) then return end
if not isAllowed( gate, ent ) then return end
Expand Down Expand Up @@ -111,6 +114,7 @@ GateActions["entity_applytorq"] = {
timed = true,
output = function(gate, ent, vec )
if not IsValid( ent ) then return end
if ent:IsPlayer() then return end
local phys = ent:GetPhysicsObject()
if not IsValid( phys ) then return end
if not isAllowed( gate, ent ) then return end
Expand Down

0 comments on commit 22272a7

Please sign in to comment.