diff --git a/planet/Missions.ocf/DeepSeaMining.ocs/Script.c b/planet/Missions.ocf/DeepSeaMining.ocs/Script.c index fb766673e..63faf16d9 100644 --- a/planet/Missions.ocf/DeepSeaMining.ocs/Script.c +++ b/planet/Missions.ocf/DeepSeaMining.ocs/Script.c @@ -272,10 +272,11 @@ private func FindMainIslandPosition(int xpos, int sep, bool no_struct) if (sep == nil) sep = 250; + var x, y; for (var i = 0; i < 100; i++) { - var x = main_island_x + xpos + Random(sep*2+1)-sep; - var y = main_island_y / 2 - 220; + x = main_island_x + xpos + Random(sep*2+1)-sep; + y = main_island_y / 2 - 220; while (!GBackSolid(x, y) && y < LandscapeHeight()*3/4) y++; @@ -315,4 +316,4 @@ global func Particles_Smoke(...) p.DampingX = 800; } return p; -} \ No newline at end of file +}