]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/pr.c
Simplify checks whether player thread may sleep
[empserver] / src / lib / subs / pr.c
index 01fc13c8ba3af913acb1b67889df41ea2631eea7..876c819e347e30c2430f6e60ece6ea0062e7bb11 100644 (file)
@@ -244,9 +244,7 @@ pr_player(struct player *pl, int id, char *buf)
 
     if (player == pl) {
        while (io_output_if_queue_long(pl->iop,
-                       !play_wrlock_wanted
-                       && !(pl->command && (pl->command->c_flags & C_MOD)))
-              > 0)
+                       pl->may_sleep == PLAYER_SLEEP_FREELY) > 0)
            ;
     }
 }
@@ -302,9 +300,7 @@ upr_player(struct player *pl, int id, char *buf)
 
     if (player == pl) {
        while (io_output_if_queue_long(pl->iop,
-                       !play_wrlock_wanted
-                       && !(pl->command && (pl->command->c_flags & C_MOD)))
-              > 0)
+                       pl->may_sleep == PLAYER_SLEEP_FREELY) > 0)
            ;
     }
 }