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.43 by root, Mon Sep 29 09:04:51 2008 UTC vs.
Revision 1.44 by root, Mon Sep 29 10:32:50 2008 UTC

117 NO_PASS_DOORS is set. */ 117 NO_PASS_DOORS is set. */
118 if (n_keys == 1) 118 if (n_keys == 1)
119 { 119 {
120 if (wall_blocked (map, x, y)) 120 if (wall_blocked (map, x, y))
121 { 121 {
122 the_key->destroy (true); 122 the_key->destroy ();
123 return 0; 123 return 0;
124 } 124 }
125 125
126 the_keymaster = find_monster_in_room (map, x, y, RP); 126 the_keymaster = find_monster_in_room (map, x, y, RP);
127 if (!the_keymaster) /* if fail, find a spot to drop the key. */ 127 if (!the_keymaster) /* if fail, find a spot to drop the key. */
143 keyplace (map, x + 1, y - 1, keycode, NO_PASS_DOORS, 1, RP); 143 keyplace (map, x + 1, y - 1, keycode, NO_PASS_DOORS, 1, RP);
144 keyplace (map, x - 1, y + 1, keycode, NO_PASS_DOORS, 1, RP); 144 keyplace (map, x - 1, y + 1, keycode, NO_PASS_DOORS, 1, RP);
145 keyplace (map, x - 1, y - 1, keycode, NO_PASS_DOORS, 1, RP); 145 keyplace (map, x - 1, y - 1, keycode, NO_PASS_DOORS, 1, RP);
146 } 146 }
147 147
148 the_key->destroy (true); 148 the_key->destroy ();
149 return 1; 149 return 1;
150 } 150 }
151 } 151 }
152 152
153 if (the_keymaster) 153 if (the_keymaster)
331 331
332 /* first, find a place to put the chest. */ 332 /* first, find a place to put the chest. */
333 int i = find_first_free_spot (the_chest, map, x, y); // this call uses the main rng 333 int i = find_first_free_spot (the_chest, map, x, y); // this call uses the main rng
334 if (i == -1) 334 if (i == -1)
335 { 335 {
336 the_chest->destroy (true); 336 the_chest->destroy ();
337 return NULL; 337 return NULL;
338 } 338 }
339 339
340 int xl = x + freearr_x[i]; 340 int xl = x + freearr_x[i];
341 int yl = y + freearr_y[i]; 341 int yl = y + freearr_y[i];
674 for (object *tmp = GET_MAP_OB (map, x, y); tmp; ) 674 for (object *tmp = GET_MAP_OB (map, x, y); tmp; )
675 { 675 {
676 object *next = tmp->above; 676 object *next = tmp->above;
677 677
678 if (tmp->flag [FLAG_ALIVE]) 678 if (tmp->flag [FLAG_ALIVE])
679 tmp->head_ ()->destroy (true); 679 tmp->head_ ()->destroy ();
680 680
681 tmp = next; 681 tmp = next;
682 } 682 }
683} 683}
684 684
824 824
825 door = doorlist[i]; 825 door = doorlist[i];
826 new_door->face = door->face; 826 new_door->face = door->face;
827 new_door->x = door->x; 827 new_door->x = door->x;
828 new_door->y = door->y; 828 new_door->y = door->y;
829 door->destroy (true); 829 door->destroy ();
830 doorlist[i] = new_door; 830 doorlist[i] = new_door;
831 insert_ob_in_map (new_door, map, NULL, 0); 831 insert_ob_in_map (new_door, map, NULL, 0);
832 new_door->slaying = format ("RMG-%d-%d", (int)rmg_rndm (1000000000), (int)rmg_rndm (1000000000)); 832 new_door->slaying = format ("RMG-%d-%d", (int)rmg_rndm (1000000000), (int)rmg_rndm (1000000000));
833 keyplace (map, new_door->x, new_door->y, new_door->slaying, NO_PASS_DOORS, 2, RP); 833 keyplace (map, new_door->x, new_door->y, new_door->slaying, NO_PASS_DOORS, 2, RP);
834 } 834 }
850 retrofit_joined_wall (map, door->x, door->y - 1, 0, RP); 850 retrofit_joined_wall (map, door->x, door->y - 1, 0, RP);
851 retrofit_joined_wall (map, door->x, door->y + 1, 0, RP); 851 retrofit_joined_wall (map, door->x, door->y + 1, 0, RP);
852 852
853 door->face = wallface->face; 853 door->face = wallface->face;
854 854
855 wallface->destroy (true); 855 wallface->destroy ();
856 } 856 }
857 } 857 }
858 } 858 }
859} 859}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines