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.1.1.2 by elmex, Wed Feb 22 18:01:23 2006 UTC vs.
Revision 1.4 by elmex, Sun Aug 13 17:16:00 2006 UTC

1/* 1/*
2 * static char *rcsid_map_c = 2 * static char *rcsid_map_c =
3 * "$Id: region.c,v 1.1.1.2 2006/02/22 18:01:23 elmex Exp $"; 3 * "$Id: region.c,v 1.4 2006/08/13 17:16:00 elmex dead $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
226 int comp; 226 int comp;
227 227
228 if(first_region!=NULL) /* Only do this once */ 228 if(first_region!=NULL) /* Only do this once */
229 return; 229 return;
230 230
231 sprintf(filename,"%s/%s",settings.datadir,settings.regions); 231 sprintf(filename,"%s/%s/%s",settings.datadir,settings.mapdir,settings.regions);
232 LOG(llevDebug,"Reading regions from %s...\n",filename); 232 LOG(llevDebug,"Reading regions from %s...\n",filename);
233 if((fp=open_and_uncompress(filename,0,&comp))==NULL) { 233 if((fp=open_and_uncompress(filename,0,&comp))==NULL) {
234 LOG(llevError," Can't open regions file %s in init_regions.\n", filename); 234 LOG(llevError," Can't open regions file %s in init_regions.\n", filename);
235 return; 235 return;
236 } 236 }
253 253
254 new=(region *)CALLOC(1,sizeof(region)); 254 new=(region *)CALLOC(1,sizeof(region));
255 if(new==NULL) 255 if(new==NULL)
256 fatal(OUT_OF_MEMORY); 256 fatal(OUT_OF_MEMORY);
257 257
258 memset(new, sizeof(region), '\0'); 258 memset(new, '\0', sizeof(region));
259 259
260 return new; 260 return new;
261} 261}
262 262
263/* 263/*
264 * Reads/parses the region file, and copies into a linked list 264 * Reads/parses the region file, and copies into a linked list

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines