ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/player.C
(Generate patch)

Comparing deliantra/server/server/player.C (file contents):
Revision 1.183 by root, Sun Apr 20 20:01:29 2008 UTC vs.
Revision 1.184 by root, Sun Apr 20 23:25:09 2008 UTC

215 215
216 /* make sure he's a player -- needed because of class change. */ 216 /* make sure he's a player -- needed because of class change. */
217 ob->type = PLAYER; // we are paranoid 217 ob->type = PLAYER; // we are paranoid
218 ob->race = ob->arch->race; 218 ob->race = ob->arch->race;
219 219
220 ob->carrying = sum_weight (ob); 220 ob->update_weight ();
221 link_player_skills (ob); 221 link_player_skills (ob);
222 222
223 CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); 223 CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER);
224 224
225 assign (title, ob->arch->object::name); 225 assign (title, ob->arch->object::name);
2956void 2956void
2957fix_weight (void) 2957fix_weight (void)
2958{ 2958{
2959 for_all_players (pl) 2959 for_all_players (pl)
2960 { 2960 {
2961 int old = pl->ob->carrying, sum = sum_weight (pl->ob); 2961 sint32 old = pl->ob->carrying;
2962 2962
2963 if (old == sum) 2963 pl->ob->update_weight ();
2964 continue; 2964
2965 if (old != pl->ob->carrying)
2966 {
2965 pl->ob->update_stats (); 2967 pl->ob->update_stats ();
2966 LOG (llevDebug, "Fixed inventory in %s (%d -> %d)\n", &pl->ob->name, old, sum); 2968 LOG (llevDebug, "Fixed inventory in %s (%d -> %d)\n", &pl->ob->name, (int)old, (int)pl->ob->carrying);
2969 }
2967 } 2970 }
2968} 2971}
2969 2972
2970void 2973void
2971fix_luck (void) 2974fix_luck (void)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines