mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 08:11:54 +08:00
Fix buying maps causing crashes
Fixes the applyMap function that could not uncover single points of map on the top and left borders and thus was causing an infinite loop crash
This commit is contained in:
+2
-2
@@ -645,8 +645,8 @@ var World = {
|
||||
if(!World.seenAll){
|
||||
var x,y,mask = $SM.get('game.world.mask');
|
||||
do {
|
||||
x = Math.floor(Math.random() * (World.RADIUS * 2) + 1);
|
||||
y = Math.floor(Math.random() * (World.RADIUS * 2) + 1);
|
||||
x = Math.floor(Math.random() * (World.RADIUS * 2 + 1));
|
||||
y = Math.floor(Math.random() * (World.RADIUS * 2 + 1));
|
||||
} while (mask[x][y]);
|
||||
World.uncoverMap(x, y, 5, mask);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user