… | |
… | |
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) |