Added door detection to zones

master
E-Almqvist 5 years ago
parent e48c001951
commit 8575b5e45e
  1. 12
      gamemode/engine/lib/server/sv_zone.lua
  2. 8
      gamemode/engine/vars/sv_vars.lua

@ -41,3 +41,15 @@ function Quantum.Server.Zone.GetCurrentZone( vec )
end
end
end
function Quantum.Server.Zone.GetDoors( zoneid )
local zone = Quantum.Server.Zone.Get( zoneid )
local entInZone = {}
for i, ent in pairs( ents.FindInBox( zone.vec1, zone.vec2 ) ) do
if( Quantum.Server.DoorClasses[ ent:GetClass() ]) then
entInZone[i] = ent
end
end
return entInZone
end

@ -10,3 +10,11 @@ Quantum.Server.DefaultNodeHealth = 10
Quantum.Server.DefaultNodeRespawnTimer = 30
Quantum.Server.DefualtPropertyPrice = 5000
Quantum.Server.DoorClasses = {
["func_door"] = true,
["func_door_rotating"] = true,
["prop_door_rotating"] = true,
["func_movelinear"] = true,
["prop_dynamic"] = true
}
Loading…
Cancel
Save