fromJphEngineSettings always sets normalizedTorque = nullptr, and toJphEngineSettings only assigns the curve when it is non-null.
So the natural pattern silently discards the torque curve:
JoltC_VehicleEngineSettings s = ..._GetEngine(controller);
s.maxTorque = 600.0f;
..._SetEngine(controller, s); /* torque curve is now Jolt's default */
No diagnostic, no return code. The caller has changed one field and reset another.
Pinned by assertion in JoltC/tests/test_vehicle_extra.c so the behaviour is at least recorded, with a comment explaining why the assertion looks odd.
Two related items in vehicle.cpp:
VehicleTrackSettings_Init returns an uninitialised field. Upstream declares uint mDrivenWheel; with no initialiser and the wrapper copies it, so the caller receives garbage. The test asserts the other four fields and deliberately not that one.
JoltC_VehicleTrackSettings is write-only decoration. TrackedVehicleControllerSettings exposes only engine and transmission, so there is no way to hand tracks to it — a tracked vehicle cannot actually be configured through the C API.
fromJphEngineSettingsalways setsnormalizedTorque = nullptr, andtoJphEngineSettingsonly assigns the curve when it is non-null.So the natural pattern silently discards the torque curve:
No diagnostic, no return code. The caller has changed one field and reset another.
Pinned by assertion in
JoltC/tests/test_vehicle_extra.cso the behaviour is at least recorded, with a comment explaining why the assertion looks odd.Two related items in
vehicle.cpp:VehicleTrackSettings_Initreturns an uninitialised field. Upstream declaresuint mDrivenWheel;with no initialiser and the wrapper copies it, so the caller receives garbage. The test asserts the other four fields and deliberately not that one.JoltC_VehicleTrackSettingsis write-only decoration.TrackedVehicleControllerSettingsexposes only engine and transmission, so there is no way to hand tracks to it — a tracked vehicle cannot actually be configured through the C API.