diff --git a/include/player.h b/include/player.h index c5156e58..5fdc9a9c 100644 --- a/include/player.h +++ b/include/player.h @@ -65,7 +65,6 @@ struct player { int god; int owner; int nstat; - int waiting; int simulation; /* e.g. budget command */ double dolcost; int broke; diff --git a/include/prototypes.h b/include/prototypes.h index f1023bd9..3829683a 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -400,8 +400,6 @@ extern struct player *player_delete(struct player *); extern struct player *player_next(struct player *); extern struct player *player_prev(struct player *); extern struct player *getplayer(natid); -extern void player_wakeup_all(natid); -extern void player_wakeup(struct player *); extern void player_accept(void *); /* dispatch.c */ extern int dispatch(char *, char *); diff --git a/src/lib/commands/flash.c b/src/lib/commands/flash.c index 09348cc3..339d41f4 100644 --- a/src/lib/commands/flash.c +++ b/src/lib/commands/flash.c @@ -159,7 +159,6 @@ sendmessage(struct natstr *us, struct natstr *to, char *message, int verbose) else pr_flash(other, "%s (#%d): %s\n", us->nat_cnam, us->nat_cnum, message); - player_wakeup(other); sent++; } if (player->god) { diff --git a/src/lib/player/accept.c b/src/lib/player/accept.c index 81987567..a1c07459 100644 --- a/src/lib/player/accept.c +++ b/src/lib/player/accept.c @@ -163,22 +163,6 @@ getplayer(natid cnum) return NULL; } -void -player_wakeup_all(natid cnum) -{ - struct player *lp; - - if (NULL != (lp = getplayer(cnum))) - player_wakeup(lp); -} - -void -player_wakeup(struct player *pl) -{ - if (pl->waiting) - empth_wakeup(pl->proc); -} - /*ARGSUSED*/ void player_accept(void *unused) diff --git a/src/lib/subs/wu.c b/src/lib/subs/wu.c index 722e47c8..970625ca 100644 --- a/src/lib/subs/wu.c +++ b/src/lib/subs/wu.c @@ -129,7 +129,6 @@ typed_wu(natid from, natid to, char *message, int type) #endif int fd; char box[1024]; - int notify = 0; int write_ok = 0; int new_tele = 0; struct player *other; @@ -181,16 +180,12 @@ typed_wu(natid from, natid to, char *message, int type) continue; if (!player->god && (getrejects(from, np) & REJ_ANNO)) continue; - notify = (np->nat_ann == 0); np->nat_ann++; putnat(np); - if (notify) - player_wakeup_all(to); } } else if (write_ok) { - notify = (np->nat_tgms == 0); new_tele = telegram_is_new(to, &tel); - np->nat_tgms += new_tele || notify; + np->nat_tgms += new_tele || np->nat_tgms == 0; putnat(np); if (new_tele && np->nat_flags & NF_INFORM) { @@ -199,10 +194,8 @@ typed_wu(natid from, natid to, char *message, int type) pr_inform(other, "[new tele]\n"); else pr_inform(other, "[%d new teles]\n", np->nat_tgms); - player_wakeup_all(to); } - } else if (notify) - player_wakeup_all(to); + } } return 0;