Skip to content

Commit

Permalink
Don't mark a star system as "left" until after we've definitely left …
Browse files Browse the repository at this point in the history
…(to detect hyperdictions correctly).
  • Loading branch information
Tkael committed Mar 17, 2024
1 parent abca693 commit f4a652f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions EDDI/EDDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2439,12 +2439,6 @@ private bool eventFSDEngaged(FSDEngagedEvent @event)
CurrentStation = null;
CurrentStellarBody = null;

// Set the destination system as the current star system
if ( @event.systemAddress != null )
{
updateCurrentSystem( @event.system, (ulong)@event.systemAddress );
}

// Save a copy of this event for later reference
lastEvents[nameof(FSDEngagedEvent)] = @event;;

Expand Down Expand Up @@ -2537,13 +2531,8 @@ private bool eventJumped(JumpedEvent theEvent)

// After jump has completed we are always in supercruise
Environment = Constants.ENVIRONMENT_SUPERCRUISE;

if ( CurrentStarSystem == null || CurrentStarSystem.systemname != theEvent.system )
{
// The 'StartJump' event must have been missed
updateCurrentSystem( theEvent.system, theEvent.systemAddress );
}

updateCurrentSystem( theEvent.system, theEvent.systemAddress );
if ( CurrentStarSystem != null )
{
CurrentStarSystem.systemAddress = theEvent.systemAddress;
Expand Down

0 comments on commit f4a652f

Please sign in to comment.