FloatingOriginInteractive / BalsaIssues

The official issue tracker for Balsa Model Flight Simulator
6 stars 0 forks source link

Editor UI becomes completely unresponsive and I end up having to force end the game (ALT F4) #32

Closed anth1256 closed 3 years ago

anth1256 commented 3 years ago

To Reproduce Steps to reproduce the behavior: From the main menu:

  1. Start Game
  2. Build to Fly
  3. Workshop
  4. Click on No Aircraft
  5. Load a Craft
  6. Click on GO!
  7. Get into editor and wait for craft to load
  8. Leave Workshop
  9. Enter Workshop

Now the drop down gizmo menu is a white box with "caption" and none of the buttons are working, and the UI at the bottom is completely missing, and I cant pick from the part menu either

Video Evidence https://youtu.be/jVBnUNyMz-A

anth1256 commented 3 years ago

If I skip Step 5, this doesn't happen.

anth1256 commented 3 years ago

Oh. I can even do Step 7, then load a different plane and it still does it.

PsykomantaBrain commented 3 years ago

Good catch there. This looks related to yesterday's fixes to prevent double-loading vehicles. I think there's one edge case there that I missed.

PsykomantaBrain commented 3 years ago

Ok, yeah, this actually turns out to be a secondary problem that another fix I did caused. Yesterday I also fixed the Leave button in the workshop, which could cause a vehicle to be left stuck on the build area.

When you enter the game via the workshop game mode, the game sets a WorkshopMode flag, which is how things know that once they start up, the game should get itself into the editor.

The problem is that this also notifies the editor logic that it shouldn't start a new blank vehicle, because the one you selected (specified in the CraftToLoad value) is going to be spawning in.

All that is fine, until you actually leave the editor through that button. That, as of yesterday, will despawn the vehicle you had, but with a craft to load value still set, the next time you enter the editor, the game will still think a vehicle is about to load, so it just sits there, waiting for a vehicle that is never spawned.

So, what I'm doing here is changing how the game uses the CraftToLoad value that gets set in the main menu, so after it is used (at player spawn), it is gets put away. This way the vehicle editor knows to not expect that vehicle to spawn again when you re-enter it. This resets back when you return to the menu, so you don't lose the selection when you leave the scene.

PsykomantaBrain commented 3 years ago

Ok, I think this one is fixed. Will be on the next build

anth1256 commented 3 years ago

Cool, I will retest when the next build is released