ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/treasure.C
(Generate patch)

Comparing deliantra/server/random_maps/treasure.C (file contents):
Revision 1.7 by root, Sat Sep 16 22:24:13 2006 UTC vs.
Revision 1.8 by root, Tue Dec 12 20:53:03 2006 UTC

209 209
210 /* first, find a place to put the chest. */ 210 /* first, find a place to put the chest. */
211 i = find_first_free_spot (the_chest, map, x, y); 211 i = find_first_free_spot (the_chest, map, x, y);
212 if (i == -1) 212 if (i == -1)
213 { 213 {
214 free_object (the_chest); 214 the_chest->destroy (0);
215 return NULL; 215 return NULL;
216 } 216 }
217 xl = x + freearr_x[i]; 217 xl = x + freearr_x[i];
218 yl = y + freearr_y[i]; 218 yl = y + freearr_y[i];
219 219
678 for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above) 678 for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above)
679 if (QUERY_FLAG (tmp, FLAG_ALIVE)) 679 if (QUERY_FLAG (tmp, FLAG_ALIVE))
680 { 680 {
681 if (tmp->head) 681 if (tmp->head)
682 tmp = tmp->head; 682 tmp = tmp->head;
683 remove_ob (tmp); 683 tmp->remove ();
684 free_object (tmp); 684 tmp->destroy (0);
685 tmp = get_map_ob (map, x, y); 685 tmp = get_map_ob (map, x, y);
686 if (tmp == NULL) 686 if (tmp == NULL)
687 break; 687 break;
688 }; 688 };
689} 689}
848 848
849 door = doorlist[i]; 849 door = doorlist[i];
850 new_door->face = door->face; 850 new_door->face = door->face;
851 new_door->x = door->x; 851 new_door->x = door->x;
852 new_door->y = door->y; 852 new_door->y = door->y;
853 remove_ob (door); 853 door->remove ();
854 free_object (door); 854 door->destroy (0);
855 doorlist[i] = new_door; 855 doorlist[i] = new_door;
856 insert_ob_in_map (new_door, map, NULL, 0); 856 insert_ob_in_map (new_door, map, NULL, 0);
857 sprintf (keybuf, "%d", (int) RANDOM ()); 857 sprintf (keybuf, "%d", (int) RANDOM ());
858 new_door->slaying = keybuf; 858 new_door->slaying = keybuf;
859 keyplace (map, new_door->x, new_door->y, keybuf, NO_PASS_DOORS, 2, RP); 859 keyplace (map, new_door->x, new_door->y, keybuf, NO_PASS_DOORS, 2, RP);
875 retrofit_joined_wall (map, door->x + 1, door->y, 0, RP); 875 retrofit_joined_wall (map, door->x + 1, door->y, 0, RP);
876 retrofit_joined_wall (map, door->x, door->y - 1, 0, RP); 876 retrofit_joined_wall (map, door->x, door->y - 1, 0, RP);
877 retrofit_joined_wall (map, door->x, door->y + 1, 0, RP); 877 retrofit_joined_wall (map, door->x, door->y + 1, 0, RP);
878 door->face = wallface->face; 878 door->face = wallface->face;
879 if (!QUERY_FLAG (wallface, FLAG_REMOVED)) 879 if (!QUERY_FLAG (wallface, FLAG_REMOVED))
880 remove_ob (wallface); 880 wallface->remove ();
881 free_object (wallface); 881 wallface->destroy (0);
882 } 882 }
883 } 883 }
884 } 884 }
885} 885}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines