Fix variable_out_of_scope warnings in Worlds

master
Nicolas Hake 2018-07-23 12:08:18 +02:00
parent 14ed608941
commit 5ef52f2450
1 changed files with 3 additions and 2 deletions

View File

@ -334,10 +334,11 @@ private func FindMainIslandPosition(int xpos, int sep, bool no_struct)
var wdt = LandscapeWidth();
var hgt = LandscapeHeight();
var x, y;
for (var i = 0; i < 100; i++)
{
var x = RandomX(wdt / 2 + xpos - sep, wdt / 2 + xpos + sep);
var y = hgt / 2 - 220;
x = RandomX(wdt / 2 + xpos - sep, wdt / 2 + xpos + sep);
y = hgt / 2 - 220;
while (!GBackSolid(x, y) && y < 3 * hgt / 4)
y++;