… | |
… | |
464 | static void |
464 | static void |
465 | adjust_weight (object *op, weight_t sub, weight_t add) |
465 | adjust_weight (object *op, weight_t sub, weight_t add) |
466 | { |
466 | { |
467 | while (op) |
467 | while (op) |
468 | { |
468 | { |
469 | weight_t carrying = op->carrying |
469 | weight_t carrying = (weight_t)op->carrying |
470 | - weight_adjust_for (op, sub); |
470 | - weight_adjust_for (op, sub) |
471 | + weight_adjust_for (op, add); |
471 | + weight_adjust_for (op, add); |
472 | |
472 | |
473 | sub = op->carrying; |
473 | sub = op->carrying; |
474 | op->carrying = carrying; |
474 | op->carrying = carrying; |
475 | add = op->carrying; |
475 | add = op->carrying; |
… | |
… | |
1581 | if (!items // testing !items ensures we can drop at least one item |
1581 | if (!items // testing !items ensures we can drop at least one item |
1582 | || (items < m->max_items |
1582 | || (items < m->max_items |
1583 | && ms.volume () < m->max_volume)) |
1583 | && ms.volume () < m->max_volume)) |
1584 | return true; |
1584 | return true; |
1585 | |
1585 | |
1586 | if (originator && originator->is_player ()) |
1586 | if (originator) |
1587 | originator->contr->failmsgf ( |
1587 | originator->failmsgf ( |
1588 | "No matter how hard you try, you just cannot put the %s here H<Try to remove some items from the floor first.>", |
1588 | "No matter how hard you try, you just cannot put the %s here! H<Try to remove some items from the floor first.>", |
1589 | query_name () |
1589 | query_name () |
1590 | ); |
1590 | ); |
1591 | |
1591 | |
1592 | return false; |
1592 | return false; |
1593 | } |
1593 | } |