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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user