ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/object.C
(Generate patch)

Comparing deliantra/server/common/object.C (file contents):
Revision 1.230 by root, Sun May 4 08:25:32 2008 UTC vs.
Revision 1.231 by root, Sun May 4 11:12:40 2008 UTC

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 */
1894object * 1894object *
1895present_arch_in_ob (const archetype *at, const object *op) 1895present_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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines