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

Comparing deliantra/server/random_maps/random_map.C (file contents):
Revision 1.5 by root, Sat Sep 16 22:24:13 2006 UTC vs.
Revision 1.6 by root, Fri Sep 29 20:12:32 2006 UTC

68 write_map_parameters_to_string (buf, RP); 68 write_map_parameters_to_string (buf, RP);
69 69
70 if (RP->difficulty == 0) 70 if (RP->difficulty == 0)
71 { 71 {
72 RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ 72 RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */
73
73 if (RP->difficulty_increase > 0.001) 74 if (RP->difficulty_increase > 0.001)
74 {
75 RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase); 75 RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase);
76
76 if (RP->difficulty < 1) 77 if (RP->difficulty < 1)
77 RP->difficulty = 1; 78 RP->difficulty = 1;
78 }
79 } 79 }
80 else 80 else
81 RP->difficulty_given = 1; 81 RP->difficulty_given = 1;
82 82
83 if (RP->Xsize < MIN_RANDOM_MAP_SIZE) 83 if (RP->Xsize < MIN_RANDOM_MAP_SIZE)
84 RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; 84 RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5;
85
85 if (RP->Ysize < MIN_RANDOM_MAP_SIZE) 86 if (RP->Ysize < MIN_RANDOM_MAP_SIZE)
86 RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; 87 RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5;
87 88
88 if (RP->expand2x > 0) 89 if (RP->expand2x > 0)
89 { 90 {
161 162
162 theMap->msg = strdup_local (buf); 163 theMap->msg = strdup_local (buf);
163 164
164 return theMap; 165 return theMap;
165} 166}
166
167 167
168/* function selects the layout function and gives it whatever 168/* function selects the layout function and gives it whatever
169 arguments it needs. */ 169 arguments it needs. */
170char ** 170char **
171layoutgen (RMParms * RP) 171layoutgen (RMParms * RP)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines