Skip to content

Commit 9e7678c

Browse files
committed
Fix #3101: setting ship:control:mainthrottle wasn't being marked as non-neutral
-also fix wheel throttle trim mixup
1 parent 282b9d8 commit 9e7678c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Fixed a few benign but annoying errors on game load [commit 1](https://github.com/KSP-KOS/KOS/commit/019950401b93de951a0aedfa5e696d07a56200e9) [commit 2](https://github.com/KSP-KOS/KOS/commit/adb4dee40df86c19ff0f8623e3201ce134de741e)
2323
- Removed Infernal Robotics addon because it hasn't worked in several years. A separate addon mod will be created later: https://github.com/ksp-kos/kos-ir
2424
- Fixed quaternion constructor ordering when loading from a dump (thanks @DBooots) [pr](https://github.com/KSP-KOS/KOS/pull/3165)
25+
- Fixed setting `ship:control:mainthrottle` without any other controls not being detected as an input
2526

2627
## 1.5.1.0 - 2025-02-06
2728

src/kOS/Suffixed/FlightControl.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Math = System.Math;
1111
using kOS.Communication;
1212
using kOS.Control;
13+
using Smooth.Delegates;
1314

1415
namespace kOS.Suffixed
1516
{
@@ -271,13 +272,15 @@ private void ResetControls()
271272
wheelSteerTrim = default(float);
272273
wheelThrottle = default(float);
273274
wheelThrottleTrim = default(float);
275+
mainThrottle = default(float);
274276
}
275277

276278
private BooleanValue IsNeutral()
277279
{
278280
return (yaw == yawTrim && pitch == pitchTrim && roll == rollTrim &&
279281
fore == 0 && starboard == 0 && top == 0 &&
280-
wheelSteer == wheelSteerTrim && wheelThrottle == wheelSteerTrim);
282+
mainThrottle == 0 &&
283+
wheelSteer == wheelSteerTrim && wheelThrottle == wheelThrottleTrim);
281284
}
282285

283286
private void OnFlyByWire(FlightCtrlState st)

0 commit comments

Comments
 (0)