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.161 by root, Sat May 15 23:41:05 2010 UTC vs.
Revision 1.165 by sf-pippijn, Tue Mar 15 12:37:21 2011 UTC

1081 1081
1082 archetype *arch = archetype::find (f.get_str ()); 1082 archetype *arch = archetype::find (f.get_str ());
1083 1083
1084 if (!arch) 1084 if (!arch)
1085 { 1085 {
1086 LOG (llevError, "object refering to nonexistant archetype '%s'.\n", f.get_str ()); 1086 LOG (llevError, "object referring to nonexistent archetype '%s'.\n", f.get_str ());
1087 arch = archetype::find (shstr_earthwall); 1087 arch = archetype::find (shstr_earthwall);
1088 } 1088 }
1089 1089
1090 assert (arch); //D maybe use exception handling of sorts? 1090 assert (arch); //D maybe use exception handling of sorts?
1091 1091
1113 * override values and in c_wiz to mutate values. 1113 * override values and in c_wiz to mutate values.
1114 */ 1114 */
1115int 1115int
1116set_variable (object *op, char *buf) 1116set_variable (object *op, char *buf)
1117{ 1117{
1118 object_thawer f (buf, (AV *)0); 1118 object_thawer f (format ("%s\nend", buf), (AV *)0);
1119 1119
1120 return op->parse_kv (f); 1120 return op->parse_kv (f);
1121} 1121}
1122 1122
1123// compare *op against *arch and output differences 1123// compare *op against *arch and output differences
1465#endif 1465#endif
1466 1466
1467 // save body locations. gcc's memcmp does an abysmal job when used 1467 // save body locations. gcc's memcmp does an abysmal job when used
1468 for (int i = 0; i < NUM_BODY_LOCATIONS; i++) 1468 for (int i = 0; i < NUM_BODY_LOCATIONS; i++)
1469 if (expect_false (op->slot[i].info != arch->slot[i].info)) 1469 if (expect_false (op->slot[i].info != arch->slot[i].info))
1470 f.put (body_locations[i].save_name, op->slot[i].info); 1470 f.put (body_locations[i].kw, op->slot[i].info);
1471} 1471}
1472 1472
1473/* 1473/*
1474 * Dumps all variables in an object to a file. 1474 * Dumps all variables in an object to a file.
1475 * If bit 0 of flag is set, unpaid objects will be saved. As of now, 1475 * If bit 0 of flag is set, unpaid objects will be saved. As of now,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines