Ship Sensors Runtime Fix (#22495)

Fix for https://aurorastation.sentry.io/issues/7405225650

Which is a significant cause for server lag during "ship combat events".
I can no joke see the exact times ship combats occcured just by looking
at the timing chart for when this runtime gets reported.
This commit is contained in:
VMSolidus
2026-05-21 16:56:08 +00:00
committed by GitHub
parent 31d2be267d
commit e6ab597560
2 changed files with 8 additions and 3 deletions
@@ -35,8 +35,9 @@
if(sensors?.use_power)
sensor_range = round(sensors.range,1)
var/datum/overmap_contact/self_record = contact_datums[linked]
self_record.update_marker_icon()
self_record.show()
if (self_record)
self_record.update_marker_icon()
self_record.show()
// Update our 'sensor range' (ie. overmap lighting)
if(!sensors || !sensors.use_power || (stat & (NOPOWER|BROKEN)))
@@ -51,7 +52,7 @@
objects_in_view.Cut()
else
self_record.ping_radar(sensor_range)
self_record?.ping_radar(sensor_range)
// What can we see?
var/list/objects_in_current_view = list()