… | |
… | |
274 | */ |
274 | */ |
275 | bool object::can_merge_slow (object *ob1, object *ob2) |
275 | bool object::can_merge_slow (object *ob1, object *ob2) |
276 | { |
276 | { |
277 | /* A couple quick sanity checks */ |
277 | /* A couple quick sanity checks */ |
278 | if (ob1 == ob2 |
278 | if (ob1 == ob2 |
279 | || ob1->type != ob2->type |
279 | || ob1->type != ob2->type |
280 | || ob1->value != ob2->value |
280 | || ob1->value != ob2->value |
281 | || ob1->name != ob2->name |
281 | || ob1->name != ob2->name |
|
|
282 | || ob1->custom_name != ob2->custom_name |
282 | || fabs (ob1->speed - ob2->speed) >= MIN_ACTIVE_SPEED) |
283 | || fabs (ob1->speed - ob2->speed) >= MIN_ACTIVE_SPEED) |
283 | return 0; |
284 | return 0; |
284 | |
285 | |
285 | /* Do not merge objects if nrof would overflow, assume nrof |
286 | /* Do not merge objects if nrof would overflow, assume nrof |
286 | * is always 0 .. 2**31-1 */ |
287 | * is always 0 .. 2**31-1 */ |