check whether current level contains bones from a particular player */
| 759 | |
| 760 | /* check whether current level contains bones from a particular player */ |
| 761 | boolean |
| 762 | bones_include_name(const char *name) |
| 763 | { |
| 764 | struct cemetery *bp; |
| 765 | size_t len; |
| 766 | char buf[BUFSZ]; |
| 767 | |
| 768 | /* prepare buffer by appending terminal hyphen to name, to avoid partial |
| 769 | * matches producing false positives */ |
| 770 | Strcpy(buf, name); |
| 771 | Strcat(buf, "-"); |
| 772 | len = strlen(buf); |
| 773 | |
| 774 | for (bp = svl.level.bonesinfo; bp; bp = bp->next) { |
| 775 | if (!strncmp(bp->who, buf, len)) |
| 776 | return TRUE; |
| 777 | } |
| 778 | |
| 779 | return FALSE; |
| 780 | } |
| 781 | |
| 782 | /* set the ghostly bit in a list of objects */ |
| 783 | staticfn void |