version 1.85 | | version 1.86 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.85 2004/02/23 06:06:29 mwedel Exp $"; | | * "$Id: object.c,v 1.86 2004/04/14 07:24:30 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* 0x4 in flags3 is CLIENT_SENT | | * 0x4 in flags3 is CLIENT_SENT |
*/ | | */ |
if ((ob1->arch != ob2->arch) || | | if ((ob1->arch != ob2->arch) || |
(ob1->stats.sp != ob2->stats.sp) || | | |
(ob1->flags[0] != ob2->flags[0]) || | | (ob1->flags[0] != ob2->flags[0]) || |
(ob1->flags[1] != ob2->flags[1]) || | | (ob1->flags[1] != ob2->flags[1]) || |
((ob1->flags[2] & ~0x400000) != (ob2->flags[2] & ~ 0x400000)) || | | ((ob1->flags[2] & ~0x400000) != (ob2->flags[2] & ~ 0x400000)) || |
| | |
(ob1->title != ob2->title) || | | (ob1->title != ob2->title) || |
(ob1->msg != ob2->msg) || | | (ob1->msg != ob2->msg) || |
(ob1->weight != ob2->weight) || | | (ob1->weight != ob2->weight) || |
(ob1->stats.food != ob2->stats.food) || | | |
(memcmp(&ob1->resist, &ob2->resist, sizeof(ob1->resist))!=0) || | | (memcmp(&ob1->resist, &ob2->resist, sizeof(ob1->resist))!=0) || |
| | (memcmp(&ob1->stats, &ob2->stats, sizeof(ob1->stats))!=0) || |
(ob1->attacktype != ob2->attacktype) || | | (ob1->attacktype != ob2->attacktype) || |
(ob1->magic != ob2->magic) || | | (ob1->magic != ob2->magic) || |
(ob1->slaying != ob2->slaying) || | | (ob1->slaying != ob2->slaying) || |
| | |
if (ob1->level != ob2->level) return 0; | | if (ob1->level != ob2->level) return 0; |
break; | | break; |
| | |
case POTION: | | |
case AMULET: | | |
/* This should compare the value of the stats, and not the pointer | | |
* itself. There can be cases were potions seem to loose their | | |
* plus | | |
*/ | | |
if (memcmp(&ob1->stats,&ob2->stats, sizeof(living))) return 0; | | |
break; | | |
} | | } |
/* Everything passes, must be OK. */ | | /* Everything passes, must be OK. */ |
return 1; | | return 1; |