ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/loader.C
(Generate patch)

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.106 by root, Thu Apr 10 15:35:15 2008 UTC vs.
Revision 1.107 by root, Fri Apr 11 14:09:56 2008 UTC

529 { 529 {
530 switch (f.kw) 530 switch (f.kw)
531 { 531 {
532 case KW_uuid: 532 case KW_uuid:
533 if (const char *s = f.get_str ()) 533 if (const char *s = f.get_str ())
534 { 534 if (!uuid.parse (s))
535 unsigned int version;
536 unsigned long long seq;
537
538 if (2 == sscanf (s, "<%d.%llx>", &version, &seq) && version == 1)
539 { 535 {
540 uuid.seq = seq; 536 f.parse_warn ("unparseable uuid");
541 break; 537 uuid = UUID::gen ();
542 } 538 }
543 }
544
545 uuid = UUID::gen ();
546 break; 539 break;
547 540
548 case KW_oid: 541 case KW_oid:
549 f.get (this, f.get_sint32 ()); 542 f.get (this, f.get_sint32 ());
550 break; 543 break;
600 loading_arch 593 loading_arch
601 ? archetype::get (f.get_str ()) 594 ? archetype::get (f.get_str ())
602 : archetype::find (f.get_str ()); 595 : archetype::find (f.get_str ());
603 596
604 if (!other_arch) 597 if (!other_arch)
605 LOG (llevError, "%s uses unknown other_arch '%s'.\n", debug_desc (), f.get_str ()); 598 f.parse_warn (format ("%s uses unknown other_arch '%s'.\n", debug_desc (), f.get_str ()));
606 break; 599 break;
607 600
608 case KW_owner: 601 case KW_owner:
609 f.delayed_deref (this, owner, f.get_str ()); 602 f.delayed_deref (this, owner, f.get_str ());
610 break; 603 break;
1268 1261
1269 /* We don't need to worry about the arch's extra fields - they 1262 /* We don't need to worry about the arch's extra fields - they
1270 * will get taken care of the copy_to method. 1263 * will get taken care of the copy_to method.
1271 */ 1264 */
1272 1265
1273 { 1266 f.put (KW_uuid, op->uuid.c_str ());
1274 char uids[64];
1275 snprintf (uids, sizeof (uids), "<1.%llx>", (unsigned long long)op->uuid.seq);
1276 f.put (KW_uuid, (const char *)uids);
1277 }
1278 1267
1279#define CMP_OUT(v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## v, op->v) 1268#define CMP_OUT(v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## v, op->v)
1280#define CMP_OUT2(k,v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## k, op->v) 1269#define CMP_OUT2(k,v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## k, op->v)
1281 1270
1282 if (object *owner = op->owner) 1271 if (object *owner = op->owner)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines