(player_find_other): Replace by getplayer. player_find_other()

searches for a player other than US for country CNUM, which is in
state PS_PLAYING.  Since there can be at most one player in state
PS_PLAYING, and no caller pass that player as US, they can simply use
getplayer() instead.
This commit is contained in:
Markus Armbruster 2005-10-02 16:30:43 +00:00
parent f6a8a14831
commit ed5ba9fe3e
3 changed files with 4 additions and 19 deletions

View file

@ -227,21 +227,6 @@ getplayer(natid cnum)
return NULL;
}
struct player *
player_find_other(struct player *us, register natid cnum)
{
register struct emp_qelem *qp;
for (qp = Players.q_forw; qp != &Players; qp = qp->q_forw)
if (((struct player *)qp)->cnum == cnum &&
((struct player *)qp != us) &&
(((struct player *)qp)->state == PS_PLAYING))
return (struct player *)qp;
return 0;
}
void
player_wakeup_all(natid cnum)
{