--- deliantra/server/common/loader.C 2006/09/04 13:55:54 1.3 +++ deliantra/server/common/loader.C 2006/09/07 09:37:12 1.8 @@ -511,6 +511,7 @@ switch (kw) { + case KW_Object: // uppercase alias case KW_object: thawer.get (op->name); @@ -556,7 +557,22 @@ parse_object (tmp, thawer, map_flags); if (tmp->arch) - insert_ob_in_ob (tmp, op); + { + // was: insert_ob_in_ob (tmp, op); + // but manually adding it can improve map loading times a lot + CLEAR_FLAG (tmp, FLAG_OBJ_ORIGINAL); + CLEAR_FLAG (tmp, FLAG_REMOVED); + tmp->env = op; + + if (!op->inv) + op->inv = tmp; + else + { + tmp->below = op->inv; + tmp->below->above = tmp; + op->inv = tmp; + } + } else { LOG (llevDebug, "Discarding object without arch: %s\n", @@ -634,12 +650,19 @@ case KW_x: thawer.get (op->x); break; case KW_y: thawer.get (op->y); break; + case KW_Str: // uppercase alias case KW_str: thawer.get (op->stats.Str); break; + case KW_Dex: // uppercase alias case KW_dex: thawer.get (op->stats.Dex); break; + case KW_Con: // uppercase alias case KW_con: thawer.get (op->stats.Con); break; + case KW_Wis: // uppercase alias case KW_wis: thawer.get (op->stats.Wis); break; + case KW_Cha: // uppercase alias case KW_cha: thawer.get (op->stats.Cha); break; + case KW_Int: // uppercase alias case KW_int: thawer.get (op->stats.Int); break; + case KW_Pow: // uppercase alias case KW_pow: thawer.get (op->stats.Pow); break; case KW_hp: thawer.get (op->stats.hp); break; case KW_maxhp: thawer.get (op->stats.maxhp); break; @@ -970,6 +993,7 @@ case KW_editor_folder: break; + case KW_More: // uppercase alias case KW_more: /* We need to record that this is a multipart object, * so the calling function can glue things back together @@ -1001,8 +1025,8 @@ break; default: - printf ("kw abort %s\n", keyword_str [kw]);//D - abort (); + LOG (llevError, "UNSUPPORTED KEYWORD IN MAP: \"%s\", bug in normaliser. skipping.\n", keyword_str [kw]); + break; } } } @@ -1033,7 +1057,10 @@ * This function appears to be used in only 2 places - in crossedit to * override values and in c_wiz to mutate values. */ -int set_variable(object *op,char *buf) { +int +set_variable(object *op, char *buf) +{ + return 0; #if 0 int retval; object_thawer thawer (0); @@ -1100,6 +1127,8 @@ } /* This returns a string of the integer movement type */ +#if 0 +// unused function static char* get_string_move_type(MoveType mt) { static char retbuf[MAX_BUF], retbuf_all[MAX_BUF]; @@ -1137,7 +1166,8 @@ if (all_count <=1) return retbuf_all+1; else return retbuf+1; } - +#endif + // compare *op against *tmp and output differences void put (object_freezer &f, object *op, object *tmp)