… | |
… | |
712 | |
712 | |
713 | if (QUERY_FLAG (op, FLAG_IS_FLOOR) && QUERY_FLAG (op, FLAG_UNIQUE)) |
713 | if (QUERY_FLAG (op, FLAG_IS_FLOOR) && QUERY_FLAG (op, FLAG_UNIQUE)) |
714 | unique = 1; |
714 | unique = 1; |
715 | |
715 | |
716 | if (op->head_ () == op && (QUERY_FLAG (op, FLAG_UNIQUE) || unique)) |
716 | if (op->head_ () == op && (QUERY_FLAG (op, FLAG_UNIQUE) || unique)) |
717 | { |
|
|
718 | op->destroy_inv (false); |
|
|
719 | op->destroy (); |
717 | op->destroy (); |
720 | } |
|
|
721 | |
718 | |
722 | op = above; |
719 | op = above; |
723 | } |
720 | } |
724 | } |
721 | } |
725 | } |
722 | } |
… | |
… | |
813 | |
810 | |
814 | op->flag [FLAG_REMOVED] = true; |
811 | op->flag [FLAG_REMOVED] = true; |
815 | |
812 | |
816 | object *head = op->head_ (); |
813 | object *head = op->head_ (); |
817 | if (op == head) |
814 | if (op == head) |
818 | { |
|
|
819 | op->destroy_inv (false); |
|
|
820 | op->destroy (); |
815 | op->destroy (); |
821 | } |
|
|
822 | else if (head->map != op->map) |
816 | else if (head->map != op->map) |
823 | { |
817 | { |
824 | LOG (llevDebug, "bad luck for object crossing map borders: %s", head->debug_desc ()); |
818 | LOG (llevDebug, "bad luck for object crossing map borders: %s", head->debug_desc ()); |
825 | head->destroy (); |
819 | head->destroy (); |
826 | } |
820 | } |
… | |
… | |
936 | destroy = 1; |
930 | destroy = 1; |
937 | } |
931 | } |
938 | |
932 | |
939 | /* adjust overall chance below */ |
933 | /* adjust overall chance below */ |
940 | if (destroy && rndm (0, 1)) |
934 | if (destroy && rndm (0, 1)) |
941 | op->destroy (); |
935 | op->destroy (true); |
942 | } |
936 | } |
943 | } |
937 | } |
944 | |
938 | |
945 | /* |
939 | /* |
946 | * Updates every button on the map (by calling update_button() for them). |
940 | * Updates every button on the map (by calling update_button() for them). |
… | |
… | |
1137 | move_off |= tmp->move_off; |
1131 | move_off |= tmp->move_off; |
1138 | move_allow |= tmp->move_allow; |
1132 | move_allow |= tmp->move_allow; |
1139 | |
1133 | |
1140 | if (QUERY_FLAG (tmp, FLAG_BLOCKSVIEW)) flags |= P_BLOCKSVIEW; |
1134 | if (QUERY_FLAG (tmp, FLAG_BLOCKSVIEW)) flags |= P_BLOCKSVIEW; |
1141 | if (QUERY_FLAG (tmp, FLAG_NO_MAGIC)) flags |= P_NO_MAGIC; |
1135 | if (QUERY_FLAG (tmp, FLAG_NO_MAGIC)) flags |= P_NO_MAGIC; |
|
|
1136 | if (tmp->type == PLAYER) flags |= P_PLAYER; |
1142 | if (tmp->type == SAFE_GROUND) flags |= P_SAFE; |
1137 | if (tmp->type == SAFE_GROUND) flags |= P_SAFE; |
1143 | if (QUERY_FLAG (tmp, FLAG_ALIVE)) flags |= P_IS_ALIVE; |
1138 | if (QUERY_FLAG (tmp, FLAG_ALIVE)) flags |= P_IS_ALIVE; |
1144 | if (QUERY_FLAG (tmp, FLAG_DAMNED)) flags |= P_NO_CLERIC; |
1139 | if (QUERY_FLAG (tmp, FLAG_DAMNED)) flags |= P_NO_CLERIC; |
1145 | } |
1140 | } |
1146 | |
1141 | |