From e6ab5975601e3cbbf8199d2f9e7ec6725f378188 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 21 May 2026 12:56:08 -0400 Subject: [PATCH] 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. --- code/modules/overmap/contacts/contact_sensors.dm | 7 ++++--- html/changelogs/hellfirejag-ship-sensors-runtime.yml | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/hellfirejag-ship-sensors-runtime.yml diff --git a/code/modules/overmap/contacts/contact_sensors.dm b/code/modules/overmap/contacts/contact_sensors.dm index 7225e2023f9..1eb67e3968a 100644 --- a/code/modules/overmap/contacts/contact_sensors.dm +++ b/code/modules/overmap/contacts/contact_sensors.dm @@ -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() diff --git a/html/changelogs/hellfirejag-ship-sensors-runtime.yml b/html/changelogs/hellfirejag-ship-sensors-runtime.yml new file mode 100644 index 00000000000..f924b3e43fe --- /dev/null +++ b/html/changelogs/hellfirejag-ship-sensors-runtime.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a very expensive (lags the server during ship combat) runtime error related to ship sensors."