worm_known() * Is any segment of this worm in viewing range? Note: caller must check * invisibility and telepathy (which should only show the head anyway). * Mostly used in the canseemon() macro. */
| 880 | * Mostly used in the canseemon() macro. |
| 881 | */ |
| 882 | boolean |
| 883 | worm_known(struct monst *worm) |
| 884 | { |
| 885 | struct wseg *curr = wtails[worm->wormno]; |
| 886 | |
| 887 | while (curr) { |
| 888 | if (cansee(curr->wx, curr->wy)) |
| 889 | return TRUE; |
| 890 | curr = curr->nseg; |
| 891 | } |
| 892 | return FALSE; |
| 893 | } |
| 894 | |
| 895 | /* would moving from <x1,y1> to <x2,y2> involve passing between two |
| 896 | consecutive segments of the same worm? */ |
no outgoing calls
no test coverage detected