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.200 by root, Wed Jun 18 23:40:27 2008 UTC vs.
Revision 1.201 by root, Sun Aug 17 01:26:35 2008 UTC

1308 if (op->contr->mode & PU_RATIO) 1308 if (op->contr->mode & PU_RATIO)
1309 { 1309 {
1310 /* use value density to decide what else to grab */ 1310 /* use value density to decide what else to grab */
1311 /* >=7 was >= op->contr->mode */ 1311 /* >=7 was >= op->contr->mode */
1312 /* >=7 is the old standard setting. Now we take the last 4 bits 1312 /* >=7 is the old standard setting. Now we take the last 4 bits
1313 * and multiply them by 5, giving 0..15*5== 5..75 */ 1313 */
1314 wvratio = (op->contr->mode & PU_RATIO) * 5; 1314 wvratio = op->contr->mode & PU_RATIO;
1315 if ((query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1))) >= (unsigned int) wvratio) 1315 if (1000 * query_cost (tmp, op, F_TRUE) / tmp->total_weight () >= wvratio * 100)
1316 { 1316 {
1317 CHK_PICK_PICKUP; 1317 CHK_PICK_PICKUP;
1318#if 0 1318#if 0
1319 fprintf (stderr, "HIGH WEIGHT/VALUE ["); 1319 fprintf (stderr, "HIGH WEIGHT/VALUE [");
1320 if (tmp->name != NULL) 1320 if (tmp->name != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines