… | |
… | |
345 | else |
345 | else |
346 | { |
346 | { |
347 | // maybe there is a player standing on the same mapspace |
347 | // maybe there is a player standing on the same mapspace |
348 | // this will catch the case where "this" is a player |
348 | // this will catch the case where "this" is a player |
349 | if (object *pl = ms ().player ()) |
349 | if (object *pl = ms ().player ()) |
|
|
350 | if ((!pl->container && pl->contr->ns && !pl->contr->ns->update_look) |
350 | if (!pl->container || this == pl->container) |
351 | || this == pl->container) |
351 | return pl; |
352 | return pl; |
352 | } |
353 | } |
353 | } |
354 | } |
354 | |
355 | |
355 | return 0; |
356 | return 0; |
… | |
… | |
909 | || map->in_memory != MAP_ACTIVE |
910 | || map->in_memory != MAP_ACTIVE |
910 | || map->no_drop |
911 | || map->no_drop |
911 | || ms ().move_block == MOVE_ALL) |
912 | || ms ().move_block == MOVE_ALL) |
912 | { |
913 | { |
913 | while (inv) |
914 | while (inv) |
914 | { |
|
|
915 | inv->destroy_inv (false); |
|
|
916 | inv->destroy (); |
915 | inv->destroy (true); |
917 | } |
|
|
918 | } |
916 | } |
919 | else |
917 | else |
920 | { /* Put objects in inventory onto this space */ |
918 | { /* Put objects in inventory onto this space */ |
921 | while (inv) |
919 | while (inv) |
922 | { |
920 | { |
… | |
… | |
1537 | if (!nr) |
1535 | if (!nr) |
1538 | return true; |
1536 | return true; |
1539 | |
1537 | |
1540 | nr = min (nr, nrof); |
1538 | nr = min (nr, nrof); |
1541 | |
1539 | |
|
|
1540 | if (nrof > nr) |
|
|
1541 | { |
1542 | nrof -= nr; |
1542 | nrof -= nr; |
1543 | |
|
|
1544 | if (nrof) |
|
|
1545 | { |
|
|
1546 | adjust_weight (env, -weight * max (1, nr)); // carrying == 0 |
1543 | adjust_weight (env, -weight * max (1, nr)); // carrying == 0 |
1547 | |
1544 | |
1548 | if (object *pl = visible_to ()) |
1545 | if (object *pl = visible_to ()) |
1549 | esrv_update_item (UPD_NROF, pl, this); |
1546 | esrv_update_item (UPD_NROF, pl, this); |
1550 | |
1547 | |
1551 | return true; |
1548 | return true; |
1552 | } |
1549 | } |
1553 | else |
1550 | else |
1554 | { |
1551 | { |
1555 | destroy (1); |
1552 | destroy (); |
1556 | return false; |
1553 | return false; |
1557 | } |
1554 | } |
1558 | } |
1555 | } |
1559 | |
1556 | |
1560 | /* |
1557 | /* |