Fix traffic control message when starting in space#6220
Fix traffic control message when starting in space#6220impaktor merged 1 commit intopioneerspacesim:masterfrom
Conversation
|
I've tested this some more and it seem to work fine. |
|
Merge? |
|
What happens if the player is spawned outside a station? They're not docked, but in controlled space? Or do we not do that? |
|
I guess in the situation above 27 km from Phobos Base, you wouldn't expect to start with a message like that. I'll fix it. |
c4182dc to
f21847b
Compare
Fixed elseif Game.player.flightState == "DOCKED" or
station:DistanceTo(Game.player) < station.lawEnforcedRange then
playerInControlledSpace = true |
|
I've tested it some more for possible edge cases but I'm low on ideas. It now works. (Edit: Both on master and this PR) It doesn't seem to be especially defined what the behavior should be when two stations are really close to each other. You get the message from one when you enter the area and then a goodby from the other when you exit after having transited from the first one. You will not get any traffic messages when moving in between the however. This is not a great problem. You could perhaps make control zones of stations smaller when they overlap but that may be just unnecessary noise. Maybe a different message could be used. "Now leaving 'x', we hand you over to 'y'. Something like that. |
|
Merge? |
impaktor
left a comment
There was a problem hiding this comment.
I've not tested it, but looks fine when I ran the proposed changes in the software on my wetware (brain), it did not explode.
f21847b to
6c5eea1
Compare
6c5eea1 to
f0162b7
Compare

Fixes #6219 by making sure playerInControlledSpace == false when starting in space.
I don't know if there are possible edge cases where this new algorithm wouldn't work. If for instance we start in an orbit around a star but we're still in a controlled space via a space station.