--- deliantra/server/common/loader.C 2007/01/01 00:41:02 1.35 +++ deliantra/server/common/loader.C 2007/01/07 23:10:42 1.41 @@ -1,6 +1,7 @@ /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2002 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -265,9 +266,9 @@ { int ip; - /* We do some specialized handling to handle legacy cases of name_pl. + /* We do some specialised handling to handle legacy cases of name_pl. * If the object doesn't have a name_pl, we just use the object name - - * this isn't perfect (things won't be properly pluralized), but works to + * this isn't perfect (things won't be properly pluralised), but works to * that degree (5 heart is still quite understandable). But the case we * also have to catch is if this object is not using the normal name for * the object. In that case, we also want to use the loaded name. @@ -322,10 +323,8 @@ op->gen_sp_armour = op->last_heal; op->last_heal = 0; } - if (editor) - ip = 0; - else - ip = calc_item_power (op, 0); + + ip = calc_item_power (op, 0); /* Legacy objects from before item power was in the game */ if (!op->item_power && ip) { @@ -908,6 +907,7 @@ case KW_one_hit: GET_FLAG (op, FLAG_ONE_HIT); break; case KW_berserk: GET_FLAG (op, FLAG_BERSERK); break; case KW_is_buildable: GET_FLAG (op, FLAG_IS_BUILDABLE); break; + case KW_destroy_on_death: GET_FLAG (op, FLAG_DESTROY_ON_DEATH); break; case KW_armour: thawer.get (op->resist[ATNR_PHYSICAL]); break; case KW_resist_physical: thawer.get (op->resist[ATNR_PHYSICAL]); break; @@ -991,7 +991,7 @@ //TODO: allow longer messages if (strlen (op->msg) >= HUGE_BUF) { - LOG (llevDebug, "\n\tError message length >= %d: %d\n>%.80s<\n", HUGE_BUF, strlen (op->msg), &op->msg); + LOG (llevDebug, "\tError message length >= %d: %d\n>%.80s<\n", HUGE_BUF, strlen (op->msg), &op->msg); op->msg = "ERROR, please report: string too long, winged.\n"; } break; @@ -1003,7 +1003,7 @@ * about not overflowing the buffer. */ if (strlen (op->lore) > (HUGE_BUF / 2)) - LOG (llevDebug, "\n\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n", + LOG (llevDebug, "\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n", HUGE_BUF / 2, HUGE_BUF, strlen (op->lore), &op->lore); break; @@ -1059,8 +1059,7 @@ int load_object (object_thawer &fp, object *op, int map_flags) { - // cede every 500 objects loaded - coroapi::cede_every (500); + coroapi::cede_every (1000); // cede once in a while return parse_object (op, fp, map_flags); } @@ -1278,6 +1277,7 @@ KW_NULL, KW_is_buildable, /* 110 */ + KW_destroy_on_death, }; int i; @@ -1442,9 +1442,6 @@ void save_object (object_freezer &fp, object *op, int flag) { - // cede every 500 objects saved - coroapi::cede_every (500); - /* Even if the object does have an owner, it would seem that we should * still save it. */