… | |
… | |
443 | archetype *less = new_head; |
443 | archetype *less = new_head; |
444 | for (auto (p, parts.begin () + 1); p != parts.end (); ++p) |
444 | for (auto (p, parts.begin () + 1); p != parts.end (); ++p) |
445 | { |
445 | { |
446 | archetype *at = *p; |
446 | archetype *at = *p; |
447 | |
447 | |
|
|
448 | // some flags get inherited formt he head (probably a lot more) |
|
|
449 | // doing it here doesn't feel too cozy, but it allows code |
|
|
450 | // to ignore head checks for these flags, which saves time |
|
|
451 | at->flag [FLAG_ALIVE] = new_head->flag [FLAG_ALIVE]; |
|
|
452 | at->flag [FLAG_NO_PICK] = new_head->flag [FLAG_NO_PICK]; |
|
|
453 | at->flag [FLAG_MONSTER] = new_head->flag [FLAG_MONSTER]; |
|
|
454 | at->flag [FLAG_IS_FLOOR] = new_head->flag [FLAG_IS_FLOOR]; |
|
|
455 | |
448 | if (at->x < new_head->min_x) new_head->min_x = at->x; |
456 | if (at->x < new_head->min_x) new_head->min_x = at->x; |
449 | if (at->y < new_head->min_y) new_head->min_y = at->y; |
457 | if (at->y < new_head->min_y) new_head->min_y = at->y; |
450 | if (at->x > new_head->max_x) new_head->max_x = at->x; |
458 | if (at->x > new_head->max_x) new_head->max_x = at->x; |
451 | if (at->y > new_head->max_y) new_head->max_y = at->y; |
459 | if (at->y > new_head->max_y) new_head->max_y = at->y; |
452 | |
460 | |