From 1a61e2678ed6d6616b86fd4cb31b4daaaeab9f97 Mon Sep 17 00:00:00 2001 From: maudlin27 <95254039+maudlin27@users.noreply.github.com> Date: Mon, 20 May 2024 14:42:24 +0100 Subject: [PATCH] Fix AI rating for sub-1.0 ratings (#6194) --- lua/ui/lobby/lobby.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lua/ui/lobby/lobby.lua b/lua/ui/lobby/lobby.lua index 57dc76de8a..7e9b9920ef 100644 --- a/lua/ui/lobby/lobby.lua +++ b/lua/ui/lobby/lobby.lua @@ -493,14 +493,7 @@ function ComputeAIRating(gameOptions, aiLobbyProperties) local cheatBuildMultiplier = (tonumber(gameOptions.BuildMult) or 1.0) - 1.0 local cheatResourceMultiplier = (tonumber(gameOptions.CheatMult) or 1.0) - 1.0 - -- if they're smaller than 1.0 then the AI doesn't get better; it gets worse! - if cheatBuildMultiplier < 0 then - cheatBuildMultiplier = 1 / cheatBuildMultiplier - end - - if cheatResourceMultiplier < 0 then - cheatResourceMultiplier = 1 / cheatResourceMultiplier - end + -- compute the rating local cheatBuildValue = (aiLobbyProperties.ratingBuildMultiplier or 0.0) * cheatBuildMultiplier