… | |
… | |
1572 | */ |
1572 | */ |
1573 | |
1573 | |
1574 | /* if this is not the head or flag has been passed, don't check walk on status */ |
1574 | /* if this is not the head or flag has been passed, don't check walk on status */ |
1575 | if (!(flag & INS_NO_WALK_ON) && op->is_head ()) |
1575 | if (!(flag & INS_NO_WALK_ON) && op->is_head ()) |
1576 | { |
1576 | { |
1577 | if (check_move_on (op, originator)) |
1577 | if (check_move_on (op, originator, flag)) |
1578 | return 0; |
1578 | return 0; |
1579 | |
1579 | |
1580 | /* If we are a multi part object, let's work our way through the check |
1580 | /* If we are a multi part object, let's work our way through the check |
1581 | * walk on's. |
1581 | * walk on's. |
1582 | */ |
1582 | */ |
1583 | for (object *tmp = op->more; tmp; tmp = tmp->more) |
1583 | for (object *tmp = op->more; tmp; tmp = tmp->more) |
1584 | if (check_move_on (tmp, originator)) |
1584 | if (check_move_on (tmp, originator, flag)) |
1585 | return 0; |
1585 | return 0; |
1586 | } |
1586 | } |
1587 | |
1587 | |
1588 | return op; |
1588 | return op; |
1589 | } |
1589 | } |
… | |
… | |
1815 | * MSW 2001-07-08: Check all objects on space, not just those below |
1815 | * MSW 2001-07-08: Check all objects on space, not just those below |
1816 | * object being inserted. insert_ob_in_map may not put new objects |
1816 | * object being inserted. insert_ob_in_map may not put new objects |
1817 | * on top. |
1817 | * on top. |
1818 | */ |
1818 | */ |
1819 | int |
1819 | int |
1820 | check_move_on (object *op, object *originator) |
1820 | check_move_on (object *op, object *originator, int flags) |
1821 | { |
1821 | { |
1822 | if (op->flag [FLAG_NO_APPLY]) |
1822 | if (op->flag [FLAG_NO_APPLY]) |
1823 | return 0; |
1823 | return 0; |
1824 | |
1824 | |
1825 | object *tmp; |
1825 | object *tmp; |
… | |
… | |
1884 | |
1884 | |
1885 | /* Basically same logic as above, except now for actual apply. */ |
1885 | /* Basically same logic as above, except now for actual apply. */ |
1886 | if ((!op->move_type && tmp->move_on & MOVE_WALK) || |
1886 | if ((!op->move_type && tmp->move_on & MOVE_WALK) || |
1887 | ((op->move_type & tmp->move_on) && (op->move_type & ~tmp->move_on & ~tmp->move_block) == 0)) |
1887 | ((op->move_type & tmp->move_on) && (op->move_type & ~tmp->move_on & ~tmp->move_block) == 0)) |
1888 | { |
1888 | { |
|
|
1889 | if ((flags & INS_NO_AUTO_EXIT) |
|
|
1890 | && (tmp->type == EXIT || tmp->type == TELEPORTER |
|
|
1891 | || tmp->type == HOLE || tmp->type == TRAPDOOR)) //TODO: temporary, fix exits instead |
|
|
1892 | continue; |
|
|
1893 | |
1889 | move_apply (tmp, op, originator); |
1894 | move_apply (tmp, op, originator); |
1890 | |
1895 | |
1891 | if (op->destroyed ()) |
1896 | if (op->destroyed ()) |
1892 | return 1; |
1897 | return 1; |
1893 | |
1898 | |