diff options
author | Vittorio Romeo <vittorio.romeo@outlook.com> | 2021-10-31 17:59:49 +0000 |
---|---|---|
committer | Vittorio Romeo <vittorio.romeo@outlook.com> | 2021-10-31 17:59:49 +0000 |
commit | 037529ee3ccf8ffd8bf8d99b96f870d0f925e522 (patch) | |
tree | 56885d0add5eda41a02ac752bfea8d7fa181f4b9 | |
parent | a5ea27173080d6f14c1144224ad4bae0b24601cd (diff) |
Fix getRandomDir being a bit biased
-rw-r--r-- | _RELEASE/Packs/base/Scripts/common.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/_RELEASE/Packs/base/Scripts/common.lua b/_RELEASE/Packs/base/Scripts/common.lua index 1c5a306f..158ce1bd 100644 --- a/_RELEASE/Packs/base/Scripts/common.lua +++ b/_RELEASE/Packs/base/Scripts/common.lua @@ -52,7 +52,7 @@ end -- getRandomDir: returns either 1 or -1 function getRandomDir() - if u_rndInt(0, 100) > 50 then return 1 end + if u_rndInt(0, 1) == 0 then return 1 end return -1 end |