From 8b02dfe1233156fa397bd79793b12d5c92aa698f Mon Sep 17 00:00:00 2001 From: Kenny Van de Maele Date: Thu, 15 Oct 2026 14:25:47 +0200 Subject: [PATCH] refactor: share ShipReached's reach with tools The editor's map rings each marker a ShipReached trigger watches, at the distance the game watches within. It kept its own copy of the 4000, since the engine's constant was private. Making it public lets the editor read it from OpenReliant, so the two can't drift apart. --- src/engine/game/mission/events.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/game/mission/events.zig b/src/engine/game/mission/events.zig index b8e8beea..18ad8473 100644 --- a/src/engine/game/mission/events.zig +++ b/src/engine/game/mission/events.zig @@ -317,8 +317,9 @@ fn firstArmed(list: []const Watch, object: u16) ?Watch { /// How far CloseProximity's watches look, in the subject's radii (`0x004DC72C`). const close_reach: f32 = 20; -/// How far ShipReached's watches look (`0x4B742400`, its square). -const reached_reach: f32 = 4000; +/// How far ShipReached's watches look (`0x4B742400`, its square). Public for tools, such as the +/// editor's map, which rings each marker a ShipReached trigger watches. +pub const reached_reach: f32 = 4000; /// The operand of a Proximity trigger that gives its distance, in the subject's radii. const proximity_operand = 1;