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.253 by root, Sun Aug 17 22:46:26 2008 UTC vs.
Revision 1.254 by root, Sun Aug 31 01:17:11 2008 UTC

186 || ob1->speed != ob2->speed 186 || ob1->speed != ob2->speed
187 || ob1->value != ob2->value 187 || ob1->value != ob2->value
188 || ob1->name != ob2->name) 188 || ob1->name != ob2->name)
189 return 0; 189 return 0;
190 190
191 /* Do not merge objects if nrof would overflow. First part checks 191 /* Do not merge objects if nrof would overflow, assume nrof
192 * for unsigned overflow (2c), second part checks whether the result 192 * is always 0 .. 2**31-1 */
193 * would fit into a 32 bit signed int, which is often used to hold 193 if (ob1->nrof > 0x7fffffff - ob2->nrof)
194 * nrof values.
195 */
196 if (~ob1->nrof < ob2->nrof || ob1->nrof + ob2->nrof > (1UL << 31))
197 return 0; 194 return 0;
198 195
199 /* If the objects have been identified, set the BEEN_APPLIED flag. 196 /* If the objects have been identified, set the BEEN_APPLIED flag.
200 * This is to the comparison of the flags below will be OK. We 197 * This is to the comparison of the flags below will be OK. We
201 * just can't ignore the been applied or identified flags, as they 198 * just can't ignore the been applied or identified flags, as they

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines