… | |
… | |
770 | || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) |
770 | || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) |
771 | || (m.move_on | op->move_on ) != m.move_on |
771 | || (m.move_on | op->move_on ) != m.move_on |
772 | || (m.move_off | op->move_off ) != m.move_off |
772 | || (m.move_off | op->move_off ) != m.move_off |
773 | || (m.move_slow | op->move_slow) != m.move_slow |
773 | || (m.move_slow | op->move_slow) != m.move_slow |
774 | /* This isn't perfect, but I don't expect a lot of objects to |
774 | /* This isn't perfect, but I don't expect a lot of objects to |
775 | * to have move_allow right now. |
775 | * have move_allow right now. |
776 | */ |
776 | */ |
777 | || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block |
777 | || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block |
778 | || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp) |
778 | || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp) |
779 | m.flags_ = 0; |
779 | m.flags_ = 0; |
780 | } |
780 | } |
… | |
… | |
910 | || map->in_memory != MAP_ACTIVE |
910 | || map->in_memory != MAP_ACTIVE |
911 | || map->no_drop |
911 | || map->no_drop |
912 | || ms ().move_block == MOVE_ALL) |
912 | || ms ().move_block == MOVE_ALL) |
913 | { |
913 | { |
914 | while (inv) |
914 | while (inv) |
915 | { |
|
|
916 | inv->destroy_inv (false); |
|
|
917 | inv->destroy (); |
915 | inv->destroy (true); |
918 | } |
|
|
919 | } |
916 | } |
920 | else |
917 | else |
921 | { /* Put objects in inventory onto this space */ |
918 | { /* Put objects in inventory onto this space */ |
922 | while (inv) |
919 | while (inv) |
923 | { |
920 | { |
… | |
… | |
1118 | *(below ? &below->above : &ms.bot) = above; |
1115 | *(below ? &below->above : &ms.bot) = above; |
1119 | |
1116 | |
1120 | above = 0; |
1117 | above = 0; |
1121 | below = 0; |
1118 | below = 0; |
1122 | |
1119 | |
|
|
1120 | ms.flags_ = 0; |
|
|
1121 | |
1123 | if (map->in_memory == MAP_SAVING) |
1122 | if (map->in_memory == MAP_SAVING) |
1124 | return; |
1123 | return; |
1125 | |
1124 | |
1126 | int check_walk_off = !flag [FLAG_NO_APPLY]; |
1125 | int check_walk_off = !flag [FLAG_NO_APPLY]; |
1127 | |
1126 | |
… | |
… | |
1158 | LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); |
1157 | LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); |
1159 | } |
1158 | } |
1160 | |
1159 | |
1161 | last = tmp; |
1160 | last = tmp; |
1162 | } |
1161 | } |
1163 | |
|
|
1164 | /* last == NULL if there are no objects on this space */ |
|
|
1165 | //TODO: this makes little sense, why only update the topmost object? |
|
|
1166 | if (!last) |
|
|
1167 | map->at (x, y).flags_ = 0; |
|
|
1168 | else |
|
|
1169 | update_object (last, UP_OBJ_REMOVE); |
|
|
1170 | |
1162 | |
1171 | if (flag [FLAG_BLOCKSVIEW] || glow_radius) |
1163 | if (flag [FLAG_BLOCKSVIEW] || glow_radius) |
1172 | update_all_los (map, x, y); |
1164 | update_all_los (map, x, y); |
1173 | } |
1165 | } |
1174 | } |
1166 | } |
… | |
… | |
1538 | if (!nr) |
1530 | if (!nr) |
1539 | return true; |
1531 | return true; |
1540 | |
1532 | |
1541 | nr = min (nr, nrof); |
1533 | nr = min (nr, nrof); |
1542 | |
1534 | |
|
|
1535 | if (nrof > nr) |
|
|
1536 | { |
1543 | nrof -= nr; |
1537 | nrof -= nr; |
1544 | |
|
|
1545 | if (nrof) |
|
|
1546 | { |
|
|
1547 | adjust_weight (env, -weight * max (1, nr)); // carrying == 0 |
1538 | adjust_weight (env, -weight * max (1, nr)); // carrying == 0 |
1548 | |
1539 | |
1549 | if (object *pl = visible_to ()) |
1540 | if (object *pl = visible_to ()) |
1550 | esrv_update_item (UPD_NROF, pl, this); |
1541 | esrv_update_item (UPD_NROF, pl, this); |
1551 | |
1542 | |
1552 | return true; |
1543 | return true; |
1553 | } |
1544 | } |
1554 | else |
1545 | else |
1555 | { |
1546 | { |
1556 | destroy (1); |
1547 | destroy (); |
1557 | return false; |
1548 | return false; |
1558 | } |
1549 | } |
1559 | } |
1550 | } |
1560 | |
1551 | |
1561 | /* |
1552 | /* |