--- deliantra/server/common/map.C 2006/09/04 16:46:32 1.24 +++ deliantra/server/common/map.C 2006/09/08 12:56:42 1.27 @@ -1,6 +1,6 @@ /* * static char *rcsid_map_c = - * "$Id: map.C,v 1.24 2006/09/04 16:46:32 root Exp $"; + * "$Id: map.C,v 1.27 2006/09/08 12:56:42 root Exp $"; */ /* @@ -157,7 +157,7 @@ #ifndef WIN32 char *endbuf; struct stat statbuf; - int mode = 0, i; + int mode = 0; #endif if (prepend_dir) @@ -706,8 +706,7 @@ } p=shop_string; strip_endline(p); - items=(shopitems *) CALLOC(number_of_entries+1, sizeof(shopitems)); - memset(items, 0, (sizeof(shopitems) * number_of_entries+1)); + items = new shopitems [number_of_entries + 1]; for (i=0; itmpname) { @@ -1201,7 +1199,7 @@ int new_save_map (mapstruct * m, int flag) { - char filename[MAX_BUF], buf[MAX_BUF], buf_s[MAX_BUF], shop[MAX_BUF]; + char filename[MAX_BUF], buf[MAX_BUF], shop[MAX_BUF]; int i; if (flag && !*m->path) @@ -1415,7 +1413,7 @@ if (m->spaces) FREE_AND_CLEAR(m->spaces); if (m->msg) FREE_AND_CLEAR(m->msg); if (m->maplore) FREE_AND_CLEAR(m->maplore); - if (m->shopitems) FREE_AND_CLEAR(m->shopitems); + if (m->shopitems) delete [] m->shopitems; m->shopitems = 0; if (m->shoprace) FREE_AND_CLEAR(m->shoprace); if (m->buttons) free_objectlinkpt(m->buttons); @@ -1538,13 +1536,10 @@ else LOG(llevDebug, "Trying to load map %s.\n", create_pathname(name)); - //0.427459955215454 /var/crossfire/players/Saladon/_scorn_apartment_apartments - //0.414906024932861 - //0.427063941955566 - eval_pv ("$x = Event::time", 1);//D + //eval_pv ("$x = Event::time", 1);//D if (!(m = load_original_map(name, (flags & MAP_PLAYER_UNIQUE)))) return (NULL); - eval_pv ("warn \"LOAD \", Event::time - $x", 1);//D + //eval_pv ("warn \"LOAD \", Event::time - $x", 1);//D fix_auto_apply(m); /* Chests which open as default */ @@ -1612,7 +1607,7 @@ int calculate_difficulty(mapstruct *m) { object *op; archetype *at; - int x, y, i, diff; + int x, y, i; long monster_cnt = 0; double avgexp = 0; sint64 total_exp = 0;