16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

Fix clamp min max values

This commit is contained in:
docentYT
2026-05-12 16:49:02 +02:00
parent 6542021253
commit fa2ed08955

View File

@@ -3076,7 +3076,7 @@ TDynamicObject::update_load_offset() {
0.0 :
100.0 * MoverParameters->LoadAmount / MoverParameters->MaxLoad ) };
LoadOffset = std::lerp( MoverParameters->LoadType.offset_min, 0.f, std::clamp( 0.0, 1.0, loadpercentage * 0.01 ) );
LoadOffset = std::lerp( MoverParameters->LoadType.offset_min, 0.f, std::clamp( 0.0, loadpercentage * 0.01, 1.0 ) );
}
void