Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if any two playlists specify any Altitude conditions #8

Open
schpoorky opened this issue Sep 4, 2017 · 1 comment
Open

Crash if any two playlists specify any Altitude conditions #8

schpoorky opened this issue Sep 4, 2017 · 1 comment

Comments

@schpoorky
Copy link

If two different playlists each have in their playWhen sections any combination of minAltitude or maxAltitude, the game will crash once the FLIGHT scene is entered even if the playlists specify other scenes besides FLIGHT or are in every possible way mutually exclusive of each other. The happens if neither is valid in the current situation or one is valid.

@schpoorky
Copy link
Author

schpoorky commented Sep 4, 2017

It seems like STED, when evaluating playlists to pick one, continues evaluating playWhen values even after finding the playlist in question isn't valid for the current situation.
In some of my tests I used playlists with inAtmosphere = False knowing it appears first in the order and launching a vessel at KSC will have inAtmosphere = True. I thought it might shield the offending Altitude prerequisites but it still crashed.

Architecting the event evaluation to look first for things that are the most mutually exclusive (and stopping once things return False) seems wise. For example, scene is even exclusive than bodyName as there are multiple valid SOIs the active vessel could be in in the FLIGHT scene, but the Venn diagram between scenes has zero overlap. That said, within the FLIGHT scene, the active vessel is always has exactly one bodyName whose SOI it's in, so that's exclusive one level down. Likewise with situation within the context of a given bodyName though it's third tier since you could be LANDED on Moho or Eeloo. And even with a set bodyName and situation you could be at various Altitudes or Velocities while LANDED on a mountain or FLYING above the sea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant