mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Fix camera lag (#3405)
Edge case where the turf you click is the outside station area, and it has to crawl that fucking massive area. Also makes the loop generally more efficient.
This commit is contained in:
@@ -142,7 +142,17 @@
|
||||
jump_to = locate() in A
|
||||
else if(isturf(A))
|
||||
var/best_dist = INFINITY
|
||||
for(var/obj/machinery/camera/camera in get_area(A))
|
||||
var/check_area = get_area(A)
|
||||
|
||||
if (!check_area)
|
||||
return
|
||||
|
||||
for(var/cc in SSmachinery.all_cameras)
|
||||
var/obj/machinery/camera/camera = cc
|
||||
if(!camera.loc)
|
||||
continue
|
||||
if (camera.loc.loc != check_area)
|
||||
continue
|
||||
if(!camera.can_use())
|
||||
continue
|
||||
if(!can_access_camera(camera))
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
author: Skull132
|
||||
delete-after: true
|
||||
|
||||
changes:
|
||||
- bugfix: "Cameras will no longer lag the server to death whenever you click to jump to a turf that's outside the station."
|
||||
Reference in New Issue
Block a user