From 54f4c69d37795c9045221339b4dce602c6ff8cc7 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 15 Feb 2024 21:25:29 -0600 Subject: [PATCH] Cleanup(columnimp): Use std::clamp to limit race scaling --- apps/opencs/model/world/columnimp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/model/world/columnimp.hpp b/apps/opencs/model/world/columnimp.hpp index 099dd25983..0cd95b0ed2 100644 --- a/apps/opencs/model/world/columnimp.hpp +++ b/apps/opencs/model/world/columnimp.hpp @@ -586,7 +586,7 @@ namespace CSMWorld { ESXRecordT record2 = record.get(); - float bodyAttr = std::max(0.5f, std::min(2.0f, data.toFloat())); + float bodyAttr = std::clamp(data.toFloat(), 0.5f, 2.0f); if (mWeight) {