Skip to content

Commit c17ed33

Browse files
committed
mapgen: extra ranges but in wrong place
1 parent 54cc9b4 commit c17ed33

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mapgen.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ let add_mountains_list r area =
6363
match area with
6464
| EastUS -> 157 - y/3
6565
| WestUS ->
66-
if y mod 4 <> 0 || y > 144 || y < 50 then
67-
y / 5 + 96
68-
else
66+
if y mod 4 = 0 && y <= 144 && y <= 50 then
6967
y / 5 + 36
68+
else
69+
y / 5 + 96
7070
| _ -> assert false
7171
in
7272
let x = Random.int 200 r - 100 in (* -100 to 99 *)
@@ -85,7 +85,7 @@ let add_mountains_list r area =
8585
let x =
8686
match area with
8787
| WestUS -> x (* check *)
88-
| EastUS -> x + 47 - 2 * y / 3
88+
| EastUS -> x + 47 - (2 * y) / 3
8989
| _ -> assert false
9090
in x, y
9191
else
@@ -128,11 +128,11 @@ let add_mountains_list r area =
128128
| EastUS ->
129129
let y = y + 38 in (* move down *)
130130
if y <= 191 then
131-
create_range x y mountains
131+
create_range x y acc
132132
else
133-
mountains
133+
acc
134134
| WestUS ->
135-
create_range x y mountains
135+
create_range x y acc
136136
| _ -> assert false
137137
in
138138
extra_range_loop (j+1) acc

0 commit comments

Comments
 (0)