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.34 by root, Mon Sep 29 10:20:49 2008 UTC vs.
Revision 1.35 by root, Mon Sep 29 10:32:50 2008 UTC

84 while (rune) 84 while (rune)
85 { 85 {
86 next = rune->above; 86 next = rune->above;
87 87
88 if (rune->type == SIGN && !strcmp (rune->arch->archname, "rune_mark")) 88 if (rune->type == SIGN && !strcmp (rune->arch->archname, "rune_mark"))
89 rune->destroy (true); 89 rune->destroy ();
90 90
91 rune = next; 91 rune = next;
92 } 92 }
93} 93}
94 94
351 /* Now delete current wall, and insert new one 351 /* Now delete current wall, and insert new one
352 * We save flags to avoid any trouble with buildable/non buildable, and so on 352 * We save flags to avoid any trouble with buildable/non buildable, and so on
353 */ 353 */
354 object::flags_t old_flags = wall->flag; // elmex: this is where C++ pays off 354 object::flags_t old_flags = wall->flag; // elmex: this is where C++ pays off
355 355
356 wall->destroy (true); 356 wall->destroy ();
357 357
358 wall = arch_to_object (new_arch); 358 wall = arch_to_object (new_arch);
359 wall->type = BUILDABLE_WALL; 359 wall->type = BUILDABLE_WALL;
360 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y); 360 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y);
361 wall->flag = old_flags; 361 wall->flag = old_flags;
398 above = tmp->above; 398 above = tmp->above;
399 if (BUILDABLE_WALL == tmp->type) 399 if (BUILDABLE_WALL == tmp->type)
400 { 400 {
401 /* There was a wall, remove it & keep its archetype to make new walls */ 401 /* There was a wall, remove it & keep its archetype to make new walls */
402 new_wall = tmp->arch; 402 new_wall = tmp->arch;
403 tmp->destroy (true); 403 tmp->destroy ();
404 sprintf (message, "You destroy the wall and redo the floor."); 404 sprintf (message, "You destroy the wall and redo the floor.");
405 } 405 }
406 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR))) 406 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR)))
407 { 407 {
408 tmp->destroy (true); 408 tmp->destroy ();
409 floor_removed = 1; 409 floor_removed = 1;
410 } 410 }
411 else 411 else
412 { 412 {
413 if (floor_removed) 413 if (floor_removed)
542 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y); 542 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y);
543 543
544 /* If existing wall, remove it, no need to fix other walls */ 544 /* If existing wall, remove it, no need to fix other walls */
545 if (current_wall) 545 if (current_wall)
546 { 546 {
547 current_wall->destroy (true); 547 current_wall->destroy ();
548 fix_walls (pl->map, x, y); 548 fix_walls (pl->map, x, y);
549 sprintf (message, "You redecorate the wall to better suit your tastes."); 549 sprintf (message, "You redecorate the wall to better suit your tastes.");
550 } 550 }
551 else 551 else
552 { 552 {
644 con_rune = get_connection_rune (pl, x, y); 644 con_rune = get_connection_rune (pl, x, y);
645 connected = find_or_create_connection_for_map (pl, x, y, con_rune); 645 connected = find_or_create_connection_for_map (pl, x, y, con_rune);
646 if (connected == -1) 646 if (connected == -1)
647 { 647 {
648 /* Player already informed of failure by the previous function */ 648 /* Player already informed of failure by the previous function */
649 tmp->destroy (true); 649 tmp->destroy ();
650 return; 650 return;
651 } 651 }
652 652
653 /* Remove marking rune */ 653 /* Remove marking rune */
654 con_rune->destroy (true); 654 con_rune->destroy ();
655 } 655 }
656 656
657 /* For magic mouths/ears, and signs, take the msg from a book of scroll */ 657 /* For magic mouths/ears, and signs, take the msg from a book of scroll */
658 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) 658 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR))
659 { 659 {
660 if (adjust_sign_msg (pl, x, y, tmp) == -1) 660 if (adjust_sign_msg (pl, x, y, tmp) == -1)
661 { 661 {
662 tmp->destroy (true); 662 tmp->destroy ();
663 return; 663 return;
664 } 664 }
665 } 665 }
666 666
667 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y); 667 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y);
706 else if (!item->flag [FLAG_IS_BUILDABLE]) 706 else if (!item->flag [FLAG_IS_BUILDABLE])
707 new_draw_info_format (NDI_UNIQUE, 0, pl, "You can't remove the %s, it's not buildable!", query_name (item)); 707 new_draw_info_format (NDI_UNIQUE, 0, pl, "You can't remove the %s, it's not buildable!", query_name (item));
708 else 708 else
709 { 709 {
710 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item)); 710 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item));
711 item->destroy (true); 711 item->destroy ();
712 } 712 }
713} 713}
714 714
715/** 715/**
716 * Global building function 716 * Global building function
876 876
877 tmp->face = book->face; 877 tmp->face = book->face;
878 tmp->invisible = 0; 878 tmp->invisible = 0;
879 } 879 }
880 880
881 book->destroy (true); 881 book->destroy ();
882 return 0; 882 return 0;
883} 883}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines