… | |
… | |
762 | else if (action == UP_OBJ_INSERT) |
762 | else if (action == UP_OBJ_INSERT) |
763 | { |
763 | { |
764 | // this is likely overkill, TODO: revisit (schmorp) |
764 | // this is likely overkill, TODO: revisit (schmorp) |
765 | if ((QUERY_FLAG (op, FLAG_BLOCKSVIEW) && !(m.flags_ & P_BLOCKSVIEW)) |
765 | if ((QUERY_FLAG (op, FLAG_BLOCKSVIEW) && !(m.flags_ & P_BLOCKSVIEW)) |
766 | || (QUERY_FLAG (op, FLAG_NO_MAGIC) && !(m.flags_ & P_NO_MAGIC)) |
766 | || (QUERY_FLAG (op, FLAG_NO_MAGIC) && !(m.flags_ & P_NO_MAGIC)) |
|
|
767 | || (op->type == PLAYER && !(m.flags_ & P_PLAYER)) |
767 | || (op->type == SAFE_GROUND && !(m.flags_ & P_SAFE)) |
768 | || (op->type == SAFE_GROUND && !(m.flags_ & P_SAFE)) |
768 | || (QUERY_FLAG (op, FLAG_ALIVE) && !(m.flags_ & P_IS_ALIVE)) |
769 | || (QUERY_FLAG (op, FLAG_ALIVE) && !(m.flags_ & P_IS_ALIVE)) |
769 | || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) |
770 | || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) |
770 | || (m.move_on | op->move_on ) != m.move_on |
771 | || (m.move_on | op->move_on ) != m.move_on |
771 | || (m.move_off | op->move_off ) != m.move_off |
772 | || (m.move_off | op->move_off ) != m.move_off |
… | |
… | |
1114 | *(below ? &below->above : &ms.bot) = above; |
1115 | *(below ? &below->above : &ms.bot) = above; |
1115 | |
1116 | |
1116 | above = 0; |
1117 | above = 0; |
1117 | below = 0; |
1118 | below = 0; |
1118 | |
1119 | |
|
|
1120 | ms.flags_ = 0; |
|
|
1121 | |
1119 | if (map->in_memory == MAP_SAVING) |
1122 | if (map->in_memory == MAP_SAVING) |
1120 | return; |
1123 | return; |
1121 | |
1124 | |
1122 | int check_walk_off = !flag [FLAG_NO_APPLY]; |
1125 | int check_walk_off = !flag [FLAG_NO_APPLY]; |
1123 | |
1126 | |
… | |
… | |
1154 | 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 ()); |
1155 | } |
1158 | } |
1156 | |
1159 | |
1157 | last = tmp; |
1160 | last = tmp; |
1158 | } |
1161 | } |
1159 | |
|
|
1160 | /* last == NULL if there are no objects on this space */ |
|
|
1161 | //TODO: this makes little sense, why only update the topmost object? |
|
|
1162 | if (!last) |
|
|
1163 | map->at (x, y).flags_ = 0; |
|
|
1164 | else |
|
|
1165 | update_object (last, UP_OBJ_REMOVE); |
|
|
1166 | |
1162 | |
1167 | if (flag [FLAG_BLOCKSVIEW] || glow_radius) |
1163 | if (flag [FLAG_BLOCKSVIEW] || glow_radius) |
1168 | update_all_los (map, x, y); |
1164 | update_all_los (map, x, y); |
1169 | } |
1165 | } |
1170 | } |
1166 | } |