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.108 by elmex, Sun Apr 13 13:32:48 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;
813 case KW_is_turnable: GET_FLAG (this, FLAG_IS_TURNABLE); break; 806 case KW_is_turnable: GET_FLAG (this, FLAG_IS_TURNABLE); break;
814 case KW_is_used_up: GET_FLAG (this, FLAG_IS_USED_UP); break; 807 case KW_is_used_up: GET_FLAG (this, FLAG_IS_USED_UP); break;
815 case KW_alive: GET_FLAG (this, FLAG_ALIVE); break; 808 case KW_alive: GET_FLAG (this, FLAG_ALIVE); break;
816 case KW_applied: GET_FLAG (this, FLAG_APPLIED); break; 809 case KW_applied: GET_FLAG (this, FLAG_APPLIED); break;
817 case KW_unpaid: GET_FLAG (this, FLAG_UNPAID); break; 810 case KW_unpaid: GET_FLAG (this, FLAG_UNPAID); break;
811 case KW_player_sold: GET_FLAG (this, FLAG_PLAYER_SOLD); break;
818 case KW_is_animated: GET_FLAG (this, FLAG_ANIMATE); break; 812 case KW_is_animated: GET_FLAG (this, FLAG_ANIMATE); break;
819 case KW_no_pick: GET_FLAG (this, FLAG_NO_PICK); break; 813 case KW_no_pick: GET_FLAG (this, FLAG_NO_PICK); break;
820 case KW_reflecting: GET_FLAG (this, FLAG_REFLECTING); break; 814 case KW_reflecting: GET_FLAG (this, FLAG_REFLECTING); break;
821 case KW_changing: GET_FLAG (this, FLAG_CHANGING); break; 815 case KW_changing: GET_FLAG (this, FLAG_CHANGING); break;
822 case KW_splitting: GET_FLAG (this, FLAG_SPLITTING); break; 816 case KW_splitting: GET_FLAG (this, FLAG_SPLITTING); break;
1268 1262
1269 /* We don't need to worry about the arch's extra fields - they 1263 /* We don't need to worry about the arch's extra fields - they
1270 * will get taken care of the copy_to method. 1264 * will get taken care of the copy_to method.
1271 */ 1265 */
1272 1266
1273 { 1267 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 1268
1279#define CMP_OUT(v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## v, op->v) 1269#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) 1270#define CMP_OUT2(k,v) if (expect_false (op->v != tmp->v)) f.put (KW_ ## k, op->v)
1281 1271
1282 if (object *owner = op->owner) 1272 if (object *owner = op->owner)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines