--- deliantra/server/common/map.C 2007/08/25 22:19:26 1.121 +++ deliantra/server/common/map.C 2007/09/07 13:10:30 1.126 @@ -410,28 +410,6 @@ } bool -maptile::_load_objects (const char *path, bool skip_header) -{ - object_thawer f (path); - - if (!f) - return false; - - f.next (); - - if (skip_header) - for (;;) - { - keyword kw = f.kw; - f.skip (); - if (kw == KW_end) - break; - } - - return _load_objects (f); -} - -bool maptile::_save_objects (const char *path, int flags) { object_freezer freezer; @@ -613,8 +591,6 @@ { for (;;) { - thawer.next (); - switch (thawer.kw) { case KW_msg: @@ -679,10 +655,11 @@ case KW_tile_path_4: thawer.get (tile_path [3]); break; case KW_ERROR: - set_key (thawer.kw_str, thawer.value); + set_key_text (thawer.kw_str, thawer.value); break; case KW_end: + thawer.next (); return true; default: @@ -690,22 +667,13 @@ return false; break; } + + thawer.next (); } abort (); } -bool -maptile::_load_header (const char *path) -{ - object_thawer thawer (path); - - if (!thawer) - return false; - - return _load_header (thawer); -} - /****************************************************************************** * This is the start of unique map handling code *****************************************************************************/ @@ -891,7 +859,6 @@ if (QUERY_FLAG (op, FLAG_IS_FLOOR) || QUERY_FLAG (op, FLAG_OBJ_ORIGINAL) - || QUERY_FLAG (op, FLAG_OBJ_SAVE_ON_OVL) || QUERY_FLAG (op, FLAG_UNIQUE) || QUERY_FLAG (op, FLAG_OVERLAY_FLOOR) || QUERY_FLAG (op, FLAG_UNPAID) @@ -1631,11 +1598,11 @@ return; for_all_players (pl) - if (pl->ob->map == this) + if (pl->observe->map == this) if (client *ns = pl->ns) { - int dx = x - pl->ob->x; - int dy = y - pl->ob->y; + int dx = x - pl->observe->x; + int dy = y - pl->observe->y; int distance = idistance (dx, dy);