home · contact · privacy
Maps are always squares, therefore define only their edge lengths.
[plomrogue] / src / server / map_objects.c
index 975c7487fe98906bf4d588c7b4350d02d0da6a13..fa20c170455172d6c5bf6be501b9106bff7a1c81 100644 (file)
@@ -59,8 +59,8 @@ static void add_map_object(uint8_t type)
         for (pos.y = pos.x = 0; 0 == is_passable(pos); i++)
         {
             exit_err(UINT16_MAX == i, err);
-            pos.y = rrand() % world.map.size.y;
-            pos.x = rrand() % world.map.size.x;
+            pos.y = rrand() % world.map.length;
+            pos.x = rrand() % world.map.length;
         }
         struct MapObj * mo_ptr;
         uint8_t clear = 1;