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

Comparing deliantra/server/random_maps/wall.C (file contents):
Revision 1.20 by elmex, Sun Apr 15 14:15:14 2007 UTC vs.
Revision 1.21 by root, Tue Apr 17 16:21:17 2007 UTC

93 */ 93 */
94 94
95 int surround_index = 0; 95 int surround_index = 0;
96 96
97 // don't forget to update the mapspace! 97 // don't forget to update the mapspace!
98 map->at (i - 1, j).update (); 98 if (i > 0) map->at (i - 1, j ).update ();
99 map->at (i + 1, j).update (); 99 if (i < RP->Xsize - 1) map->at (i + 1, j ).update ();
100 map->at (i , j - 1).update (); 100 if (j > 0) map->at (i , j - 1).update ();
101 map->at (i , j + 1).update (); 101 if (j < RP->Ysize - 1) map->at (i , j + 1).update ();
102 102
103 if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & MOVE_WALK)) 103 if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & MOVE_WALK))
104 surround_index |= 1; 104 surround_index |= 1;
105 if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & MOVE_WALK)) 105 if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & MOVE_WALK))
106 surround_index |= 2; 106 surround_index |= 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines