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

Comparing deliantra/server/random_maps/monster.C (file contents):
Revision 1.12 by root, Mon Jan 15 15:54:19 2007 UTC vs.
Revision 1.14 by root, Sat Jan 27 02:19:37 2007 UTC

73 int number_monsters = 0; 73 int number_monsters = 0;
74 archetype *at; 74 archetype *at;
75 75
76 sprintf (styledirname, "%s", "/styles/monsterstyles"); 76 sprintf (styledirname, "%s", "/styles/monsterstyles");
77 style_map = find_style (styledirname, monsterstyle, difficulty); 77 style_map = find_style (styledirname, monsterstyle, difficulty);
78 if (style_map == 0) 78 if (!style_map)
79 return; 79 return;
80 80
81 /* fill up the map with random monsters from the monster style */ 81 /* fill up the map with random monsters from the monster style */
82 82
83 total_experience = 0; 83 total_experience = 0;
89 int x, y, freeindex; 89 int x, y, freeindex;
90 90
91 if (this_monster == NULL) 91 if (this_monster == NULL)
92 return; /* no monster?? */ 92 return; /* no monster?? */
93 93
94 x = RANDOM () % RP->Xsize; 94 x = rndm (RP->Xsize);
95 y = RANDOM () % RP->Ysize; 95 y = rndm (RP->Ysize);
96 freeindex = find_first_free_spot (this_monster, map, x, y); 96 freeindex = find_first_free_spot (this_monster, map, x, y);
97 if (freeindex != -1) 97 if (freeindex != -1)
98 { 98 {
99 object *new_monster = arch_to_object (this_monster->arch); 99 object *new_monster = arch_to_object (this_monster->arch);
100 100

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines