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. 10
      gamemode/engine/vars/sv_vars.lua

@ -40,4 +40,16 @@ function Quantum.Server.Zone.GetCurrentZone( vec )
return zone return zone
end end
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 end

@ -9,4 +9,12 @@ Quantum.Server.DefaultNodeHealth = 10
Quantum.Server.DefaultNodeRespawnTimer = 30 Quantum.Server.DefaultNodeRespawnTimer = 30
Quantum.Server.DefualtPropertyPrice = 5000 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