… | |
… | |
1818 | LOG (llevError, "Present_arch called outside map.\n"); |
1818 | LOG (llevError, "Present_arch called outside map.\n"); |
1819 | return NULL; |
1819 | return NULL; |
1820 | } |
1820 | } |
1821 | |
1821 | |
1822 | for (object *tmp = m->at (x, y).bot; tmp; tmp = tmp->above) |
1822 | for (object *tmp = m->at (x, y).bot; tmp; tmp = tmp->above) |
1823 | if (tmp->arch == at) |
1823 | if (tmp->arch->archname == at->archname) |
1824 | return tmp; |
1824 | return tmp; |
1825 | |
1825 | |
1826 | return NULL; |
1826 | return NULL; |
1827 | } |
1827 | } |
1828 | |
1828 | |
… | |
… | |
1892 | * The first matching object is returned, or NULL if none. |
1892 | * The first matching object is returned, or NULL if none. |
1893 | */ |
1893 | */ |
1894 | object * |
1894 | object * |
1895 | present_arch_in_ob (const archetype *at, const object *op) |
1895 | present_arch_in_ob (const archetype *at, const object *op) |
1896 | { |
1896 | { |
1897 | for (object *tmp = op->inv; tmp != NULL; tmp = tmp->below) |
1897 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
1898 | if (tmp->arch == at) |
1898 | if (tmp->arch->archname == at->archname) |
1899 | return tmp; |
1899 | return tmp; |
1900 | |
1900 | |
1901 | return NULL; |
1901 | return NULL; |
1902 | } |
1902 | } |
1903 | |
1903 | |