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

Comparing deliantra/server/common/region.C (file contents):
Revision 1.22 by root, Thu Feb 1 19:15:56 2007 UTC vs.
Revision 1.23 by root, Thu Feb 1 19:40:42 2007 UTC

262 * Then initialises treasures by calling load_treasures(). 262 * Then initialises treasures by calling load_treasures().
263 */ 263 */
264void 264void
265init_regions (void) 265init_regions (void)
266{ 266{
267 char filename[MAX_BUF];
268 int comp;
269
270 if (!regions.size ()) 267 if (!regions.size ())
271 { 268 {
272 // make sure one region is always available 269 // make sure one region is always available
273 region *rgn = new region; 270 region *rgn = new region;
274 rgn->name = "<builtin>"; 271 rgn->name = "<builtin>";
275 rgn->longname = "Built-in Region"; 272 rgn->longname = "Built-in Region";
276 regions.push_back (rgn); 273 regions.push_back (rgn);
277 } 274 }
278
279 sprintf (filename, "%s/%s/%s", settings.datadir, settings.mapdir, settings.regions);
280 LOG (llevDebug, "Reading regions from %s...\n", filename);
281
282 loader_region loader;
283
284 if (!loader.load (filename))
285 {
286 LOG (llevError, "Can't open regions file %s in init_regions.\n", filename);
287 return;
288 }
289
290 LOG (llevDebug, " done\n");
291} 275}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines