mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
fix error if sky_camera was respawned
This commit is contained in:
parent
0ca0956d18
commit
cbcacf9273
@ -5,6 +5,9 @@ hook.Add("InitPostEntity","pac_get_sky_camera",function()
|
||||
local in_skybox = {}
|
||||
|
||||
timer.Create("pac_in_skybox", 0.5, 0, function()
|
||||
if not IsValid(sky_camera) then
|
||||
sky_camera = ents.FindByClass("sky_camera")[1]
|
||||
end
|
||||
local new_in_skybox = {}
|
||||
for _, ent in ipairs(ents.FindInPVS(sky_camera:GetPos())) do
|
||||
if not in_skybox[ent] then
|
||||
|
Loading…
Reference in New Issue
Block a user