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.50 by root, Wed Nov 16 23:42:02 2016 UTC vs.
Revision 1.51 by root, Sun Jan 29 02:47:05 2017 UTC

76{ 76{
77 /* 77 /*
78 * 1 = blocked to left, 78 * 1 = blocked to left,
79 * 2 = blocked to right, 79 * 2 = blocked to right,
80 * 4 = blocked above 80 * 4 = blocked above
81 * 8 = blocked below 81 * 8 = blocked below
82 */ 82 */
83 int surround_index = 0; 83 int surround_index = 0;
84 84
85 // don't forget to update the mapspace! 85 // don't forget to update the mapspace!
86 if (i > 0) map->at (i - 1, j ).update (); 86 if (i > 0) map->at (i - 1, j ).update ();
242/* this takes a map, and changes an existing wall to match what's blocked 242/* this takes a map, and changes an existing wall to match what's blocked
243 * around it, counting only doors and walls as blocked. If insert_flag is 243 * around it, counting only doors and walls as blocked. If insert_flag is
244 * 1, it will go ahead and insert the wall into the map. If not, it 244 * 1, it will go ahead and insert the wall into the map. If not, it
245 * will only return the wall which would belong there, and doesn't 245 * will only return the wall which would belong there, and doesn't
246 * remove anything. It depends on the 246 * remove anything. It depends on the
247 * global, previously-set variable, "wall_name" 247 * global, previously-set variable, "wall_name"
248 */ 248 */
249object * 249object *
250retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP) 250retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP)
251{ 251{
252 int l; 252 int l;
258 for (the_wall = GET_MAP_OB (the_map, i, j); the_wall; the_wall = the_wall->above) 258 for (the_wall = GET_MAP_OB (the_map, i, j); the_wall; the_wall = the_wall->above)
259 if ((the_wall->move_type & MOVE_WALK) && the_wall->type != EXIT && the_wall->type != TELEPORTER) 259 if ((the_wall->move_type & MOVE_WALK) && the_wall->type != EXIT && the_wall->type != TELEPORTER)
260 break; 260 break;
261 261
262 /* if what we found is a door, don't remove it, set the_wall to NULL to 262 /* if what we found is a door, don't remove it, set the_wall to NULL to
263 * signal that later. 263 * signal that later.
264 */ 264 */
265 if (the_wall && (the_wall->type == DOOR || the_wall->type == LOCKED_DOOR)) 265 if (the_wall && (the_wall->type == DOOR || the_wall->type == LOCKED_DOOR))
266 { 266 {
267 the_wall = NULL; 267 the_wall = NULL;
268 /* if we're not supposed to insert a new wall where there wasn't one, 268 /* if we're not supposed to insert a new wall where there wasn't one,
269 * we've gotta leave. 269 * we've gotta leave.
270 */ 270 */
271 if (insert_flag == 0) 271 if (insert_flag == 0)
272 return 0; 272 return 0;
273 } 273 }
274 else if (the_wall == NULL) 274 else if (the_wall == NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines