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.31 by root, Fri Nov 6 13:03:34 2009 UTC vs.
Revision 1.32 by root, Sun Nov 29 17:41:07 2009 UTC

217 strcat (wall_name, "_4"); 217 strcat (wall_name, "_4");
218 break; 218 break;
219 } 219 }
220 wall_arch = archetype::find (wall_name); 220 wall_arch = archetype::find (wall_name);
221 221
222 return wall_arch ? arch_to_object (wall_arch) : arch_to_object (the_wall->arch); 222 return wall_arch ? wall_arch->instance () : the_wall->arch->instance ();
223} 223}
224 224
225/* takes a map and a layout, and puts walls in the map (picked from 225/* takes a map and a layout, and puts walls in the map (picked from
226 w_style) at '#' marks. */ 226 w_style) at '#' marks. */
227void 227void
262 if (layout[i][j] == '#') 262 if (layout[i][j] == '#')
263 { 263 {
264 if (joinedwalls) 264 if (joinedwalls)
265 thiswall = pick_joined_wall (the_wall, layout, i, j, RP); 265 thiswall = pick_joined_wall (the_wall, layout, i, j, RP);
266 else 266 else
267 thiswall = arch_to_object (the_wall->arch); 267 thiswall = the_wall->arch->instance ();
268 268
269 thiswall->x = i; 269 thiswall->x = i;
270 thiswall->y = j; 270 thiswall->y = j;
271 thiswall->move_block = MOVE_ALL; 271 thiswall->move_block = MOVE_ALL;
272 insert_ob_in_map (thiswall, map, thiswall, INS_NO_MERGE | INS_NO_WALK_ON); 272 insert_ob_in_map (thiswall, map, thiswall, INS_NO_MERGE | INS_NO_WALK_ON);
385 385
386 wall_arch = archetype::find (RP->wall_name); 386 wall_arch = archetype::find (RP->wall_name);
387 387
388 if (!wall_arch) 388 if (!wall_arch)
389 { 389 {
390 new_wall = arch_to_object (wall_arch); 390 new_wall = wall_arch->instance ();
391 new_wall->x = i; 391 new_wall->x = i;
392 new_wall->y = j; 392 new_wall->y = j;
393 393
394 if (the_wall && the_wall->map) 394 if (the_wall && the_wall->map)
395 the_wall->destroy (); 395 the_wall->destroy ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines