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.8 by root, Tue Dec 12 20:53:03 2006 UTC vs.
Revision 1.9 by root, Tue Dec 12 21:39:56 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 the_chest->destroy (0); 214 the_chest->destroy ();
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
265 if (the_trap) 265 if (the_trap)
266 { 266 {
267 object *new_trap; 267 object *new_trap;
268 268
269 new_trap = arch_to_object (the_trap->arch); 269 new_trap = arch_to_object (the_trap->arch);
270 copy_object (new_trap, the_trap); 270 new_trap->copy_to (the_trap);
271 new_trap->x = x; 271 new_trap->x = x;
272 new_trap->y = y; 272 new_trap->y = y;
273 insert_ob_in_ob (new_trap, the_chest); 273 insert_ob_in_ob (new_trap, the_chest);
274 } 274 }
275 } 275 }
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 tmp->remove (); 683 tmp->remove ();
684 tmp->destroy (0); 684 tmp->destroy ();
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}
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 door->remove (); 853 door->remove ();
854 door->destroy (0); 854 door->destroy ();
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);
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 wallface->remove (); 880 wallface->remove ();
881 wallface->destroy (0); 881 wallface->destroy ();
882 } 882 }
883 } 883 }
884 } 884 }
885} 885}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines