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.90 by root, Sun Jul 1 05:00:17 2007 UTC vs.
Revision 1.93 by root, Tue Jul 31 17:33:14 2007 UTC

637 637
638 case KW_face: 638 case KW_face:
639 face = face_find (f.get_str ()); 639 face = face_find (f.get_str ());
640 break; 640 break;
641 641
642 case KW_sound:
643 sound = sound_find (f.get_str ());
644 if (!sound)
645 sound = face_find (f.get_str ());//TODO: really fall back to face name?
646 break;
647
642 case KW_x: f.get (x); break; 648 case KW_x: f.get (x); break;
643 case KW_y: f.get (y); break; 649 case KW_y: f.get (y); break;
644 650
645 case KW_Str: // uppercase alias 651 case KW_Str: // uppercase alias
646 case KW_str: f.get (stats.Str); break; 652 case KW_str: f.get (stats.Str); break;
958 randomitems = 0; 964 randomitems = 0;
959 break; 965 break;
960 966
961 case KW_msg: 967 case KW_msg:
962 f.get_ml (KW_endmsg, msg); 968 f.get_ml (KW_endmsg, msg);
963 //TODO: allow longer messages
964 if (strlen (msg) >= HUGE_BUF)
965 {
966 LOG (llevDebug, "\tError message length >= %d: %d\n>%.80s<\n", HUGE_BUF, strlen (msg), &msg);
967 msg = "ERROR, please report: string too long, winged.\n";
968 }
969 break; 969 break;
970 970
971 case KW_lore: 971 case KW_lore:
972 f.get_ml (KW_endlore, lore); 972 f.get_ml (KW_endlore, lore);
973 //TODO: allow longer messages
974 /* Just print a warning so we can be reasonably safe
975 * about not overflowing the buffer.
976 */
977 if (strlen (lore) > (HUGE_BUF / 2))
978 LOG (llevDebug, "\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n",
979 HUGE_BUF / 2, HUGE_BUF, strlen (lore), &lore);
980 break; 973 break;
981 974
982 case KW_editable: 975 case KW_editable:
983 case KW_editor_folder: 976 case KW_editor_folder:
984 break; 977 break;
1279 CMP_OUT (name_pl); 1272 CMP_OUT (name_pl);
1280 CMP_OUT (custom_name); 1273 CMP_OUT (custom_name);
1281 CMP_OUT (title); 1274 CMP_OUT (title);
1282 CMP_OUT (race); 1275 CMP_OUT (race);
1283 CMP_OUT (slaying); 1276 CMP_OUT (slaying);
1284
1285 if (op->msg != tmp->msg)
1286 f.put (KW_msg, KW_endmsg, op->msg);
1287 if (op->lore != tmp->lore)
1288 f.put (KW_lore, KW_endlore, op->lore);
1289
1290 CMP_OUT (other_arch); 1277 CMP_OUT (other_arch);
1291 1278
1279 if (op->msg != tmp->msg ) f.put (KW_msg , KW_endmsg , op->msg );
1280 if (op->lore != tmp->lore) f.put (KW_lore, KW_endlore, op->lore);
1281
1282 if (op->sound != tmp->sound) f.put (KW_sound, op->sound ? &faces [op->sound] : 0);
1292 if (op->face != tmp->face) f.put (KW_face, op->face ? &faces [op->face] : 0); 1283 if (op->face != tmp->face ) f.put (KW_face , op->face ? &faces [op->face ] : 0);
1293 1284
1294 if (op->animation_id != tmp->animation_id) 1285 if (op->animation_id != tmp->animation_id)
1295 if (op->animation_id) 1286 if (op->animation_id)
1296 { 1287 {
1297 f.put (KW_animation, animations[GET_ANIM_ID (op)].name); 1288 f.put (KW_animation, animations[GET_ANIM_ID (op)].name);
1298 1289
1299 if (!QUERY_FLAG (op, FLAG_ANIMATE)) 1290 if (!QUERY_FLAG (op, FLAG_ANIMATE))
1300 f.put (KW_is_animated, (sint32) 0); 1291 f.put (KW_is_animated, (sint32)0);
1301 } 1292 }
1302 else 1293 else
1303 f.put (KW_animation, (const char *) 0); 1294 f.put (KW_animation, (const char *)0);
1304 1295
1305 CMP_OUT2 (str, stats.Str); 1296 CMP_OUT2 (str, stats.Str);
1306 CMP_OUT2 (dex, stats.Dex); 1297 CMP_OUT2 (dex, stats.Dex);
1307 CMP_OUT2 (con, stats.Con); 1298 CMP_OUT2 (con, stats.Con);
1308 CMP_OUT2 (wis, stats.Wis); 1299 CMP_OUT2 (wis, stats.Wis);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines