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.143 by root, Mon Nov 9 19:17:58 2009 UTC vs.
Revision 1.144 by root, Tue Nov 10 04:38:45 2009 UTC

330 330
331 if (!name_pl) 331 if (!name_pl)
332 name_pl = name; 332 name_pl = name;
333 333
334 /* objects now have a materialname. try to patch it in */ 334 /* objects now have a materialname. try to patch it in */
335 if (!(is_weapon () && level > 0)) 335 if (material == &material_null && !(is_weapon () && level > 0))
336 set_materialname (this, map ? map->difficulty : 5, 0); 336 select_material (this, map ? map->difficulty : 5);
337 337
338 /* only do these when program is first run - a bit 338 /* only do these when program is first run - a bit
339 * excessive to do this at every run - most of this is 339 * excessive to do this at every run - most of this is
340 * really just to catch any errors - program will still run, but 340 * really just to catch any errors - program will still run, but
341 * not in the ideal fashion. 341 * not in the ideal fashion.
725 case KW_invisible: f.get (invisible); break; 725 case KW_invisible: f.get (invisible); break;
726 case KW_magic: f.get (magic); break; 726 case KW_magic: f.get (magic); break;
727 case KW_state: f.get (state); break; 727 case KW_state: f.get (state); break;
728 case KW_move_slow_penalty: f.get (move_slow_penalty); break; 728 case KW_move_slow_penalty: f.get (move_slow_penalty); break;
729 case KW_material: f.get (materials); break; //TODO: nuke 729 case KW_material: f.get (materials); break; //TODO: nuke
730 case KW_materialname: f.get (materialname); break; 730
731 case KW_materialname:
732 {
733 shstr sh;
734 f.get (sh);
735 material = name_to_material (sh);
736 }
737 break;
731 738
732 /* These are the new values */ 739 /* These are the new values */
733 case KW_move_block: set_move (move_block, f.get_str ()); break; 740 case KW_move_block: set_move (move_block, f.get_str ()); break;
734 case KW_move_allow: set_move (move_allow, f.get_str ()); break; 741 case KW_move_allow: set_move (move_allow, f.get_str ()); break;
735 case KW_move_type: set_move (move_type, f.get_str ()); break; 742 case KW_move_type: set_move (move_type, f.get_str ()); break;
1359 CMP_OUT (attack_movement); 1366 CMP_OUT (attack_movement);
1360 CMP_OUT (nrof); 1367 CMP_OUT (nrof);
1361 CMP_OUT (level); 1368 CMP_OUT (level);
1362 CMP_OUT (attacktype); 1369 CMP_OUT (attacktype);
1363 1370
1364 // using memcmp here seems to be a loss - us gcc vectorising? 1371 // using memcmp here seems to be a loss - is gcc vectorising?
1365 for (int i = 0; i < NROFATTACKS; i++) 1372 for (int i = 0; i < NROFATTACKS; i++)
1366 if (expect_false (op->resist[i] != arch->resist[i])) 1373 if (expect_false (op->resist[i] != arch->resist[i]))
1367 f.put (resist_save[i], op->resist[i]); 1374 f.put (resist_save[i], op->resist[i]);
1368 1375
1369 CMP_OUT (path_attuned); 1376 CMP_OUT (path_attuned);
1370 CMP_OUT (path_repelled); 1377 CMP_OUT (path_repelled);
1371 CMP_OUT (path_denied); 1378 CMP_OUT (path_denied);
1379
1372 CMP_OUT2 (material, materials);//TODO: nuke 1380 CMP_OUT2 (material, materials);//TODO: nuke
1373 CMP_OUT (materialname); 1381 if (op->material != arch->material)
1382 f.put (KW_materialname, op->material->name);
1383
1374 CMP_OUT (value); 1384 CMP_OUT (value);
1375 CMP_OUT (carrying); 1385 CMP_OUT (carrying);
1376 CMP_OUT (weight); 1386 CMP_OUT (weight);
1377 CMP_OUT (invisible); 1387 CMP_OUT (invisible);
1378 CMP_OUT (state); 1388 CMP_OUT (state);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines