-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NPCs were frequently aborting uncleanly after being podded due to the decision about what action to take being made before a sector lock is acquired (e.g. it will try to perform its selected trade, but can't find the port anymore because it's no longer in the same sector). We fix this by checking that we are still in the same sector after we acquire the sector lock. If not, skip the chosen action and let it try again (with a new action and a new lock). Note that we could have moved the sector locking to before the action selection. This would ensure that executing the selected action is always valid, but it would not avoid the sector consistency check after lock acquisition. So we keep the lock acquisition where it is to keep lock time to a minimum.
- Loading branch information
Showing
4 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters