--- deliantra/server/common/map.C 2009/11/10 05:05:22 1.174 +++ deliantra/server/common/map.C 2009/11/11 23:27:56 1.177 @@ -219,33 +219,6 @@ return 0; } -/* When the map is loaded, load_object does not actually insert objects - * into inventory, but just links them. What this does is go through - * and insert them properly. - * The object 'container' is the object that contains the inventory. - * This is needed so that we can update the containers weight. - */ -static void -fix_container (object *container) -{ - object *tmp = container->inv, *next; - - container->inv = 0; - while (tmp) - { - next = tmp->below; - if (tmp->inv) - fix_container (tmp); - - insert_ob_in_ob (tmp, container); - tmp = next; - } - - // go through and calculate what all the containers are carrying. - //TODO: remove - container->update_weight (); -} - //-GPL void @@ -272,6 +245,19 @@ INVOKE_OBJECT (RESET, tmp); } +void +maptile::post_load () +{ +#if 0 + if (!spaces) + return; + + for (mapspace *ms = spaces + size (); ms-- > spaces; ) + for (object *tmp = ms->bot; tmp; tmp = tmp->above) + ; // nop +#endif +} + //+GPL /* link_multipart_objects go through all the objects on the map looking @@ -730,10 +716,10 @@ bool maptile::_save_header (object_freezer &freezer) { -#define MAP_OUT(k) freezer.put (KW_ ## k, k) -#define MAP_OUT2(k,v) freezer.put (KW_ ## k, v) +#define MAP_OUT(k) freezer.put (KW(k), k) +#define MAP_OUT2(k,v) freezer.put (KW(k), v) - MAP_OUT2 (arch, "map"); + MAP_OUT2 (arch, CS(map)); if (name) MAP_OUT (name); MAP_OUT (swap_time); @@ -757,8 +743,8 @@ MAP_OUT (enter_x); MAP_OUT (enter_y); - if (msg) freezer.put (KW_msg , KW_endmsg , msg); - if (maplore) freezer.put (KW_maplore, KW_endmaplore, maplore); + if (msg) freezer.put (KW(msg) , KW(endmsg) , msg); + if (maplore) freezer.put (KW(maplore), KW(endmaplore), maplore); MAP_OUT (outdoor); MAP_OUT (temp); @@ -777,7 +763,7 @@ if (tile_path [3]) MAP_OUT2 (tile_path_4, tile_path [3]); freezer.put (this); - freezer.put (KW_end); + freezer.put (KW(end)); return true; }