ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/build_map.C
(Generate patch)

Comparing deliantra/server/server/build_map.C (file contents):
Revision 1.16 by root, Sat Dec 23 07:32:29 2006 UTC vs.
Revision 1.17 by root, Mon Dec 25 14:43:23 2006 UTC

263 263
264 int connect = 0; 264 int connect = 0;
265 265
266 if ((x > 0) && get_wall (map, x - 1, y)) 266 if ((x > 0) && get_wall (map, x - 1, y))
267 connect |= 1; 267 connect |= 1;
268 if ((x < MAP_WIDTH (map) - 1) && get_wall (map, x + 1, y)) 268 if ((x < map->width - 1) && get_wall (map, x + 1, y))
269 connect |= 2; 269 connect |= 2;
270 270
271 if ((y > 0) && get_wall (map, x, y - 1)) 271 if ((y > 0) && get_wall (map, x, y - 1))
272 connect |= 4; 272 connect |= 4;
273 273
274 if ((y < MAP_HEIGHT (map) - 1) && get_wall (map, x, y + 1)) 274 if ((y < map->height - 1) && get_wall (map, x, y + 1))
275 connect |= 8; 275 connect |= 8;
276 276
277 switch (connect) 277 switch (connect)
278 { 278 {
279 case 0: 279 case 0:
771 } 771 }
772 772
773 x = pl->x + freearr_x[dir]; 773 x = pl->x + freearr_x[dir];
774 y = pl->y + freearr_y[dir]; 774 y = pl->y + freearr_y[dir];
775 775
776 if ((1 > x) || (1 > y) || ((MAP_WIDTH (pl->map) - 2) < x) || ((MAP_HEIGHT (pl->map) - 2) < y)) 776 if ((1 > x) || (1 > y) || ((pl->map->width - 2) < x) || ((pl->map->height - 2) < y))
777 { 777 {
778 new_draw_info (NDI_UNIQUE, 0, pl, "Can't build on map edge..."); 778 new_draw_info (NDI_UNIQUE, 0, pl, "Can't build on map edge...");
779 return; 779 return;
780 } 780 }
781 781

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines