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.11 by root, Tue Dec 12 20:53:03 2006 UTC vs.
Revision 1.12 by root, Tue Dec 12 21:39:57 2006 UTC

82 82
83 rune = GET_MAP_OB (map, x, y); 83 rune = GET_MAP_OB (map, x, y);
84 while (rune) 84 while (rune)
85 { 85 {
86 next = rune->above; 86 next = rune->above;
87
87 if ((rune->type == SIGN) && (!strcmp (rune->arch->name, "rune_mark"))) 88 if ((rune->type == SIGN) && (!strcmp (rune->arch->name, "rune_mark")))
88 {
89 rune->remove ();
90 rune->destroy (0); 89 rune->destroy ();
91 } 90
92 rune = next; 91 rune = next;
93 } 92 }
94} 93}
95 94
96/** 95/**
358 /* Now delete current wall, and insert new one 357 /* Now delete current wall, and insert new one
359 * We save flags to avoid any trouble with buildable/non buildable, and so on 358 * We save flags to avoid any trouble with buildable/non buildable, and so on
360 */ 359 */
361 for (flag = 0; flag < 4; flag++) 360 for (flag = 0; flag < 4; flag++)
362 old_flags[flag] = wall->flags[flag]; 361 old_flags[flag] = wall->flags[flag];
363 wall->remove (); 362
364 wall->destroy (0); 363 wall->destroy ();
365 364
366 wall = arch_to_object (new_arch); 365 wall = arch_to_object (new_arch);
367 wall->type = WALL; 366 wall->type = WALL;
368 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y); 367 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y);
369 for (flag = 0; flag < 4; flag++) 368 for (flag = 0; flag < 4; flag++)
407 above = tmp->above; 406 above = tmp->above;
408 if (WALL == tmp->type) 407 if (WALL == tmp->type)
409 { 408 {
410 /* There was a wall, remove it & keep its archetype to make new walls */ 409 /* There was a wall, remove it & keep its archetype to make new walls */
411 new_wall = tmp->arch; 410 new_wall = tmp->arch;
412 tmp->remove ();
413 tmp->destroy (0); 411 tmp->destroy ();
414 sprintf (message, "You destroy the wall and redo the floor."); 412 sprintf (message, "You destroy the wall and redo the floor.");
415 } 413 }
416 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR))) 414 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR)))
417 { 415 {
418 tmp->remove ();
419 tmp->destroy (0); 416 tmp->destroy ();
420 floor_removed = 1; 417 floor_removed = 1;
421 } 418 }
422 else 419 else
423 { 420 {
424 if (floor_removed) 421 if (floor_removed)
553 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y); 550 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y);
554 551
555 /* If existing wall, remove it, no need to fix other walls */ 552 /* If existing wall, remove it, no need to fix other walls */
556 if (current_wall) 553 if (current_wall)
557 { 554 {
558 current_wall->remove ();
559 current_wall->destroy (0); 555 current_wall->destroy ();
560 fix_walls (pl->map, x, y); 556 fix_walls (pl->map, x, y);
561 sprintf (message, "You redecorate the wall to better suit your tastes."); 557 sprintf (message, "You redecorate the wall to better suit your tastes.");
562 } 558 }
563 else 559 else
564 { 560 {
655 con_rune = get_connection_rune (pl, x, y); 651 con_rune = get_connection_rune (pl, x, y);
656 connected = find_or_create_connection_for_map (pl, x, y, con_rune); 652 connected = find_or_create_connection_for_map (pl, x, y, con_rune);
657 if (connected == -1) 653 if (connected == -1)
658 { 654 {
659 /* Player already informed of failure by the previous function */ 655 /* Player already informed of failure by the previous function */
660 tmp->destroy (0); 656 tmp->destroy ();
661 return; 657 return;
662 } 658 }
663 /* Remove marking rune */ 659 /* Remove marking rune */
664 con_rune->remove ();
665 con_rune->destroy (0); 660 con_rune->destroy ();
666 } 661 }
667 662
668 /* For magic mouths/ears, and signs, take the msg from a book of scroll */ 663 /* For magic mouths/ears, and signs, take the msg from a book of scroll */
669 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) 664 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR))
670 { 665 {
671 if (adjust_sign_msg (pl, x, y, tmp) == -1) 666 if (adjust_sign_msg (pl, x, y, tmp) == -1)
672 { 667 {
673 tmp->destroy (0); 668 tmp->destroy ();
674 return; 669 return;
675 } 670 }
676 } 671 }
677 672
678 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y); 673 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y);
739 /* Fall through */ 734 /* Fall through */
740 735
741 default: 736 default:
742 /* Remove generic item */ 737 /* Remove generic item */
743 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item)); 738 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item));
744 item->remove ();
745 item->destroy (0); 739 item->destroy ();
746 } 740 }
747} 741}
748 742
749/** 743/**
750 * Global building function 744 * Global building function
911 } 905 }
912 906
913 tmp->face = book->face; 907 tmp->face = book->face;
914 tmp->invisible = 0; 908 tmp->invisible = 0;
915 } 909 }
916 book->remove (); 910
917 book->destroy (0); 911 book->destroy ();
918 return 0; 912 return 0;
919} 913}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines