diff --git a/build.zig.zon b/build.zig.zon index 62bd639..a73badc 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,8 +5,8 @@ .minimum_zig_version = "0.17.0", .dependencies = .{ .openreliant = .{ - .url = "git+https://github.com/OpenReliant/openreliant.git?ref=v0.16.0#8f338898662b8d90dc46155f9c5e0fa8f675a687", - .hash = "openreliant-0.16.0-0BXqcu8hEQHGnJKjycTDx6_hWKjgfnegKmeO8hAoxBdo", + .url = "git+https://github.com/OpenReliant/openreliant.git?ref=v0.17.0#0ff6b4a899196df83b03a8d66e9569aa2572e09a", + .hash = "openreliant-0.17.0-0BXqckSWEQH_0VU44BIB5Bid0oIIn1yMnVF645X8rLs7", }, .sdl = .{ .url = "git+https://github.com/castholm/SDL.git?ref=v0.5.4+3.4.16#b72b3671502a70e109350ecac90afdc480dcfcc6", diff --git a/src/game/starlancer.zig b/src/game/starlancer.zig index 8d9e23d..a6fa8a8 100644 --- a/src/game/starlancer.zig +++ b/src/game/starlancer.zig @@ -696,7 +696,8 @@ fn scene(arena: Allocator, text: []const u8, known: game.Outline) Allocator.Erro .squads => try walk.squads.put(arena, record.name, {}), .triggers => if (std.meta.stringToEnum(dte.Condition, record.condition) == .ship_reached) { const subject = known.named(record.subject) orelse continue; - try ranges.append(arena, .{ .section = subject.section, .index = subject.index, .radius = reached_reach, .label = record.condition, .style = .trigger }); + // As far as OpenReliant's mission events watch. + try ranges.append(arena, .{ .section = subject.section, .index = subject.index, .radius = game_mission.events.reached_reach, .label = record.condition, .style = .trigger }); }, .curves => try paths.append(arena, try curvePath(arena, record)), else => {}, @@ -1022,10 +1023,6 @@ fn isScenery(type_name: []const u8) bool { return ship_type == gameobj.Type.of(.sun_marker) or ship_type == gameobj.Type.of(.nebula_marker); } -/// How far ShipReached's triggers look around a nav point or a waypoint, as OpenReliant's mission -/// events watch (`reached_reach`, `0x0052A5D0`). -const reached_reach = 4000; - /// The points a curve's path passes on the map. const curve_points = 48;