mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
Fix clamp min max values
This commit is contained in:
@@ -3076,7 +3076,7 @@ TDynamicObject::update_load_offset() {
|
|||||||
0.0 :
|
0.0 :
|
||||||
100.0 * MoverParameters->LoadAmount / MoverParameters->MaxLoad ) };
|
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
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user