Skip to content

Commit

Permalink
Fix crash when toggling rotation damping during follow-orient mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sturnclaw committed Feb 1, 2025
1 parent 7678c7e commit be7f603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ship/PlayerShipController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ 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;

Expand Down

0 comments on commit be7f603

Please sign in to comment.