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.144 by root, Tue Nov 10 04:38:45 2009 UTC vs.
Revision 1.147 by root, Wed Nov 11 18:06:46 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 (material == &material_null && !(is_weapon () && level > 0)) 335 if (material == MATERIAL_NULL && !(is_weapon () && level > 0))
336 select_material (this, map ? map->difficulty : 5); 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
859 case KW_reflect_missile: GET_FLAG (this, FLAG_REFL_MISSILE); break; 859 case KW_reflect_missile: GET_FLAG (this, FLAG_REFL_MISSILE); break;
860 case KW_reflect_spell: GET_FLAG (this, FLAG_REFL_SPELL); break; 860 case KW_reflect_spell: GET_FLAG (this, FLAG_REFL_SPELL); break;
861 case KW_no_magic: GET_FLAG (this, FLAG_NO_MAGIC); break; 861 case KW_no_magic: GET_FLAG (this, FLAG_NO_MAGIC); break;
862 case KW_no_drop: GET_FLAG (this, FLAG_NO_DROP); break; 862 case KW_no_drop: GET_FLAG (this, FLAG_NO_DROP); break;
863 case KW_random_movement: GET_FLAG (this, FLAG_RANDOM_MOVE); break; 863 case KW_random_movement: GET_FLAG (this, FLAG_RANDOM_MOVE); break;
864 case KW_no_fix_player: GET_FLAG (this, FLAG_NO_FIX_PLAYER); break;
865 case KW_is_lightable: GET_FLAG (this, FLAG_IS_LIGHTABLE); break; 864 case KW_is_lightable: GET_FLAG (this, FLAG_IS_LIGHTABLE); break;
866 case KW_tear_down: GET_FLAG (this, FLAG_TEAR_DOWN); break; 865 case KW_tear_down: GET_FLAG (this, FLAG_TEAR_DOWN); break;
867 case KW_can_use_shield: GET_FLAG (this, FLAG_USE_SHIELD); break; 866 case KW_can_use_shield: GET_FLAG (this, FLAG_USE_SHIELD); break;
868 case KW_can_cast_spell: GET_FLAG (this, FLAG_CAST_SPELL); break; 867 case KW_can_cast_spell: GET_FLAG (this, FLAG_CAST_SPELL); break;
869 case KW_can_use_scroll: GET_FLAG (this, FLAG_USE_SCROLL); break; 868 case KW_can_use_scroll: GET_FLAG (this, FLAG_USE_SCROLL); break;
1175 KW_unaggressive, 1174 KW_unaggressive,
1176 KW_reflect_missile, 1175 KW_reflect_missile,
1177 /* 40 */ 1176 /* 40 */
1178 KW_reflect_spell, 1177 KW_reflect_spell,
1179 KW_no_magic, 1178 KW_no_magic,
1180 KW_no_fix_player, 1179 KW_NULL,
1181 KW_is_lightable, 1180 KW_is_lightable,
1182 KW_tear_down, 1181 KW_tear_down,
1183 KW_run_away, 1182 KW_run_away,
1184 KW_NULL, // pass_thru 1183 KW_NULL, // pass_thru
1185 KW_NULL, // an_pass_thru 1184 KW_NULL, // an_pass_thru
1302 1301
1303 CMP_OUT (name); 1302 CMP_OUT (name);
1304 CMP_OUT (name_pl); 1303 CMP_OUT (name_pl);
1305 1304
1306 CMP_OUT (speed); 1305 CMP_OUT (speed);
1307 CMP_OUT (speed_left); 1306
1307 // speed_left is a major time-burner, and has good locality, so
1308 // we use a simple lookup-cache to avoid the very slow printf.
1309 if (op->speed_left != arch->speed_left)
1310 {
1311 static double last_speed_left = 0.;
1312 static char last_speed_left_str [256] = "speed_left 0\n";
1313 static int last_speed_left_len = sizeof ("speed_left 0\n") - 1;
1314
1315 if (last_speed_left != op->speed_left)
1316 {
1317 last_speed_left = op->speed_left;
1318 last_speed_left_len = sizeof ("speed_left ") - 1
1319 + sprintf (last_speed_left_str + sizeof ("speed_left ") - 1, "%.7g\n", last_speed_left);
1320 }
1321
1322 f.add (last_speed_left_str, last_speed_left_len);
1323 }
1308 1324
1309 CMP_OUT (title); 1325 CMP_OUT (title);
1310 CMP_OUT (race); 1326 CMP_OUT (race);
1311 CMP_OUT (slaying); 1327 CMP_OUT (slaying);
1312 CMP_OUT (skill); 1328 CMP_OUT (skill);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines