From e8908dfee85e6265abb8c7178dc0f74d4c1472ff Mon Sep 17 00:00:00 2001 From: phosit Date: Sun, 23 Jun 2024 17:17:46 +0000 Subject: [PATCH] Fix getArea The code didn't call `this.isCircularMap` but checks if it's defined. The function returned the wrong values for square maps. Broken in 480228f964 Comments by: @Stan Differential Revision: https://code.wildfiregames.com/D5288 This was SVN commit r28122. --- binaries/data/mods/public/maps/random/rmgen/RandomMap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/maps/random/rmgen/RandomMap.js b/binaries/data/mods/public/maps/random/rmgen/RandomMap.js index 2b11ab466a..ef3e6dc144 100644 --- a/binaries/data/mods/public/maps/random/rmgen/RandomMap.js +++ b/binaries/data/mods/public/maps/random/rmgen/RandomMap.js @@ -140,7 +140,7 @@ RandomMap.prototype.getSize = function() RandomMap.prototype.getArea = function(size = this.size) { - return this.isCircularMap ? diskArea(size / 2) : size * size; + return this.isCircularMap() ? diskArea(size / 2) : size * size; }; /**