--- deliantra/server/common/map.C 2006/09/04 17:36:12 1.25 +++ deliantra/server/common/map.C 2006/09/08 18:26:22 1.28 @@ -1,6 +1,6 @@ /* * static char *rcsid_map_c = - * "$Id: map.C,v 1.25 2006/09/04 17:36:12 root Exp $"; + * "$Id: map.C,v 1.28 2006/09/08 18:26:22 root Exp $"; */ /* @@ -157,7 +157,7 @@ #ifndef WIN32 char *endbuf; struct stat statbuf; - int mode = 0, i; + int mode = 0; #endif if (prepend_dir) @@ -257,10 +257,8 @@ if (newmap) *newmap = mp; if (nx) *nx = newx; if (ny) *ny = newy; - retval |= mp->spaces[newx + mp->width * newy].flags; - if (retval & P_SAFE) - retval |= P_NO_MAGIC | P_NO_CLERIC; // P_SAFE does imply these + retval |= mp->spaces[newx + mp->width * newy].flags; return retval; } @@ -706,8 +704,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 +1197,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 +1411,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); @@ -1609,7 +1605,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; @@ -1809,7 +1805,7 @@ if (QUERY_FLAG(tmp,FLAG_DAMNED)) flags |= P_NO_CLERIC; if (tmp->type == SAFE_GROUND) - flags |= P_SAFE | P_NO_CLERIC | P_NO_MAGIC; + flags |= P_SAFE; if (QUERY_FLAG(tmp,FLAG_BLOCKSVIEW)) flags |= P_BLOCKSVIEW;