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.19 by root, Sat Feb 17 23:32:11 2007 UTC vs.
Revision 1.20 by elmex, Sun Apr 15 14:15:14 2007 UTC

92 * 8 = blocked below 92 * 8 = blocked below
93 */ 93 */
94 94
95 int surround_index = 0; 95 int surround_index = 0;
96 96
97 // don't forget to update the mapspace!
98 map->at (i - 1, j).update ();
99 map->at (i + 1, j).update ();
100 map->at (i , j - 1).update ();
101 map->at (i , j + 1).update ();
102
97 if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & ~MOVE_BLOCK_DEFAULT)) 103 if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & MOVE_WALK))
98 surround_index |= 1; 104 surround_index |= 1;
99 if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & ~MOVE_BLOCK_DEFAULT)) 105 if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & MOVE_WALK))
100 surround_index |= 2; 106 surround_index |= 2;
101 if ((j > 0) && (GET_MAP_MOVE_BLOCK (map, i, j - 1) & ~MOVE_BLOCK_DEFAULT)) 107 if ((j > 0) && (GET_MAP_MOVE_BLOCK (map, i, j - 1) & MOVE_WALK))
102 surround_index |= 4; 108 surround_index |= 4;
103 if ((j < RP->Ysize - 1) && (GET_MAP_MOVE_BLOCK (map, i, j + 1) & ~MOVE_BLOCK_DEFAULT)) 109 if ((j < RP->Ysize - 1) && (GET_MAP_MOVE_BLOCK (map, i, j + 1) & MOVE_WALK))
104 surround_index |= 8; 110 surround_index |= 8;
105 111
106 return surround_index; 112 return surround_index;
107} 113}
108 114

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines