(sendmessage): Skip players not in state PS_PLAYING. Flashes to them

get ignored, hence telling the player that the flash was sent is
wrong.  Skipping fixes that.
This commit is contained in:
Markus Armbruster 2005-06-09 22:28:54 +00:00
parent c051c5f58d
commit e6ef2545bd

View file

@ -151,6 +151,8 @@ sendmessage(struct natstr *us, struct natstr *to, char *message
time(&now); time(&now);
tm = localtime(&now); tm = localtime(&now);
for (other = player_next(0); other != 0; other = player_next(other)) { for (other = player_next(0); other != 0; other = player_next(other)) {
if (other->state != PS_PLAYING)
continue;
if (to && other->cnum != to->nat_cnum) if (to && other->cnum != to->nat_cnum)
continue; continue;
if (!(wto = getnatp(other->cnum))) if (!(wto = getnatp(other->cnum)))