--- deliantra/server/common/loader.C 2007/02/16 19:43:40 1.59 +++ deliantra/server/common/loader.C 2007/02/19 19:10:31 1.62 @@ -973,15 +973,23 @@ } object * -object::read (object_thawer &f) +object::read (object_thawer &f, maptile *map) { assert (f.kw == KW_arch); archetype *arch = archetype::find (f.get_str ()); + + if (!arch) + { + LOG (llevError, "object refering to nonexistant archetype '%s'.\n", f.get_str ()); + arch = archetype::find ("earthwall"); + } + assert (arch); //D maybe use exception handling of sorts? object *op = object::create (); + op->map = map; op->arch = arch; arch->clone.copy_to (op); // copy_to activates, this should be fixed properly @@ -1007,6 +1015,7 @@ { object_thawer f (buf, (AV *)0); + f.kw = KW_arch; // special hack so that parse_kv skips return op->parse_kv (f); }