2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-12 21:31:43 +00:00

fix: iw4 physpreset uses FLT_MAX as infinite friction

This commit is contained in:
Jan Laupetin
2026-05-03 15:56:09 +02:00
parent 67bdb79654
commit a31d3c4b88
2 changed files with 2 additions and 2 deletions
@@ -45,7 +45,7 @@ namespace
physPreset.bounce = physPresetInfo.bounce;
if (physPresetInfo.isFrictionInfinity != 0)
physPreset.friction = std::numeric_limits<float>::infinity();
physPreset.friction = std::numeric_limits<float>::max();
else
physPreset.friction = physPresetInfo.friction;
@@ -37,7 +37,7 @@ namespace
physPresetInfo->mass = physPreset->mass;
physPresetInfo->bounce = physPreset->bounce;
if (std::isinf(physPreset->friction))
if (physPreset->friction >= std::numeric_limits<float>::max())
{
physPresetInfo->isFrictionInfinity = 1;
physPresetInfo->friction = 0;