-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Game crashes when disabling rotation while exiting a station #5933
Comments
It seems to me that pushing (most likely accidentally) on "Kill rotation" when cruise mode is on should be ignored. That is, a patch like this: --- a/src/ship/PlayerShipController.cpp
+++ b/src/ship/PlayerShipController.cpp
@@ -708,7 +708,7 @@ void PlayerShipController::PollControls(const float timeStep, int *mouseMotion,
wantAngVel += Util::NeededAngVelocityToFaceDirection(*this, timeStep, GetMouseDir(), outParams.angPower);
}
- if (InputBindings.killRot->IsActive()) SetFlightControlState(CONTROL_FIXHEADING_KILLROT);
+ if (InputBindings.killRot->IsActive() && GetFlightControlState() != CONTROL_FIXSPEED) SetFlightControlState(CONTROL_FIXHEADING_KILLROT);
outParams.desiredAngular = wantAngVel; Because if we go to |
Hmm, looks like my last comment got lost in the aether.. In my case it was definitely not an accident that I pushed the kill-rotation button. I very specifically wanted my ship to stop following the station rotation so that I could manoeuvre properly and set course to my next destination without the station rotation interfering. The patch I proposed appeared to result in the expected flight behaviour.. but might need more testing in different circumstances. |
The fact is that the ship itself always kills rotation by default. The "kill rotation" button is used when the "rotation damping" is disabled and the ship is freely dangling in space. In your case, the ship rotates because it follows the station, repeating its movement, this is not free rotation. What you really want is to disable cruise mode, which is achieved by clicking on the "Flight Assist" button (I guess that's what it should be called) and selecting the appropriate mode. |
|
@Zireael07 |
Either 1) be grayed out and do nothing or 2) do what turning off flight assist does (disable cruise) |
I don't want to disable cruise, I just want to disable the "follow rotation" and remain in cruise mode. There should never be a "wrong" button for the player to press.. |
It's not clear what "grayed out" should be, we don't have such a button in the gui, as far as I know, only binding. And I am inclined to think that it should not do anything, since other elements are responsible for changing flight modes.
Okay, you can do this too via the "Flight Assist" button.
Yes, this is also a good declaration, which is hard to disagree with. |
Ah, I thought those were on-screen HUD buttons, that's why I said "greyed out". In which case it shouldn't do anything |
Not sure how intuitive it would be, but Kill Rot could be used to quicky turn off Follow Orientation, without affecting cruise control. The radial menu can be a bit fiddly anyway, it would be useful to have a keybind for toggling it anyway, and the Kill Rot button might be a good candindate, since it is only useful if Rot Damping is off. So it could double as that. At least I think that having the Rot Damping off wouldn't make sense anyway when you have Follow Orientation on. Since your engines are already actively working on keeping you synced. |
So I just tested this and there's no (apparent) way to disable "Follow Rotation" mode when exiting a space-station other than the button (kill-rot) which causes a crash in the current implementation. (Actually there is - see below; leaving this for posterity since i already typed it up) Steps to repro:
The mouse context-menu on the cruise-control indicator just lets me select between different orientations (prograde, retrograde, etc). The mouse context-menu on the station just lets me select auto-pilot modes. Clicking on the "rotation damping" button does nothing (even though the indicator changes) The cruise-control button (F5) just toggles between free-flight and forward-cruise mode. It does not disable "follow-orientation". Leaving the stations' frame of reference does not disable "follow-orientation". Leaving the stations controlled space does not disable "follow-orientation". ..... Actually there is - I just found that LEFT-clicking on the cruise-mode indicator brings up a different context menu (I was only right-clicking up to now..), and this does provide a way to toggle "follow-orientation" mode. But while this works, the icon is actually greyed-out so it appears as if it's disabled. BUG: if "follow-orientation" is ON, and you go too far from the station, then the icon really does become disabled and from this point onwards there is no way to disable it. Proposal:
|
Yes, this is also a correct statement, but this may be a separate, rather large project. By the way, you can configure the binding to open the round menu “Flight Assist” and “Attitude Hold”, and then select the desired one using the arrows.
Yes, it’s probably worth at least making the cross brighter.
I think these are related statements and are a topic for a separate issue. There is a certain distance specified at which follow orientation works, but this requires additional refinement.
Please note that this mode works not only in relation to a rotating station, but also in relation to any ship, not only rotating but also maneuvering in any way. This is not used in the game yet, but perhaps in the future it will be useful, for example, for docking with a rotating ship. In addition, the possibility of landing directly on the station's residential ring is being considered. |
@bszlrd |
So after binding the pop-up menus to hot-keys, it's possible to invoke the functionality to stop follow-mode. It might still be useful to eventually have specific hot-keys for this, but currently not so important. What might be more important is providing default bindings for bringing up those pop-up menus... (I bound them to Z and X) I'll give the patch proposed here : #5933 (comment) a playtest; sounds like it will have less side-effects than the one I proposed. |
yes please |
@Gliese852 Maybe it is two separate binding, but mapped to the same key? |
@bszlrd Yes, we can probably create 2 actions, but strictly separate their areas of application so that we can bind the same button, and this is an interesting case! |
I'd be hesitant to bind the same button to two separate actions; at least by default. It'll most likely cause no end of confusion amongst users. |
FWIW, the patch proposed by @Gliese852 seems to work fine. I'd still propose adding some distances at which it auto-disables though.. |
I think in this case sharing a binding shouldn't be problematic, since you are either in one or the other situation, they don't overlap. At least they shouldn't. Auto-off of Orientation follow, might need some thought. Especially if we want to allow ring landing eventually (I do want to make some new orbitals, even larger than the current ones). But yeah, a frame change would be a good point to switch it off, since it would avoid the flight computer seemingly going haywire when it would start to sync up with a planet for example. On a half-unrelated note, I think I'd raise the orbital station frame radius at least to 50km. Maybe it could even be set by the station itself (for eventual larger stations. I'm eyeing an O'neill's clinder, and the trimsheet workflow. Won't happen fast though) |
From a diegetic perspective, I could see ships having an easily accessible "kill rotational velocity" button on the flight controls which would disable follow-orientation mode and also immediately attempt to stop all angular velocity. This would be a point in favor of a single binding. From a user-accessibility perspective, it might be better to have a "disable follow mode" binding separate from "disable autopilot" and "kill rotation". The first binding would go back to normal cruise mode from any of the follow modes, the second would cancel any kind of fixspeed or fixheading mode, and the last would attempt to cancel angular velocity so long as the button is held down. |
Observed behaviour
When launching from a station using flight-assist mode, killing the rotation causes the game to crash.
Expected behaviour
Game does not crash.
Steps to reproduce
Patch
Game crashes on an
assert
inPlayerShipController::FlightAssist()
. The assert is partially invalid because immediately prior to callingFlightAssist
the game callsPollControls
which can set the flight mode toCONTROL_FIXHEADING_KILLROT
The following patch fixes the issue:
My pioneer version (and OS):
Pioneer "trunk"; Debian GNU/Linux 12
My output.txt (required) and game save (optional, but recommended)
output.txt
FWIW, the
output.txt
does not include the output from assertion failures - it probably should:Scan_Test.zip
The text was updated successfully, but these errors were encountered: