… | |
… | |
754 | if (dir != -1) |
754 | if (dir != -1) |
755 | { |
755 | { |
756 | /* This is basically grabbed for generate monster. Fixed 971225 to |
756 | /* This is basically grabbed for generate monster. Fixed 971225 to |
757 | * insert multipart monsters properly |
757 | * insert multipart monsters properly |
758 | */ |
758 | */ |
|
|
759 | //TODO: use expand_tail + ... |
759 | while (at != NULL) |
760 | while (at != NULL) |
760 | { |
761 | { |
761 | tmp = arch_to_object (at); |
762 | tmp = arch_to_object (at); |
762 | tmp->x = op->x + freearr_x[dir] + at->x; |
763 | tmp->x = op->x + freearr_x[dir] + at->x; |
763 | tmp->y = op->y + freearr_y[dir] + at->y; |
764 | tmp->y = op->y + freearr_y[dir] + at->y; |
… | |
… | |
765 | if (head) |
766 | if (head) |
766 | { |
767 | { |
767 | tmp->head = head; |
768 | tmp->head = head; |
768 | prev->more = tmp; |
769 | prev->more = tmp; |
769 | } |
770 | } |
|
|
771 | |
770 | if (!head) |
772 | if (!head) |
771 | head = tmp; |
773 | head = tmp; |
|
|
774 | |
772 | prev = tmp; |
775 | prev = tmp; |
|
|
776 | |
773 | at = at->more; |
777 | at = (archetype *)at->more; |
774 | } |
778 | } |
775 | |
779 | |
776 | if (head->randomitems) |
780 | if (head->randomitems) |
777 | create_treasure (head->randomitems, head, GT_INVISIBLE, op->map->difficulty, 0); |
781 | create_treasure (head->randomitems, head, GT_INVISIBLE, op->map->difficulty, 0); |
778 | |
782 | |