COMMAND (cmd_wait) {
int qid;
- qid = do_wait(player, cause, arg_left, arg_right, SW_ISSET(sw, SWITCH_UNTIL), 0);
- atr_add(player, "QID", tprintf("%d", qid), player, 0);
+ if (SW_BY_NAME(sw, "PID"))
+ do_waitpid(player, arg_left, arg_right, SW_ISSET(sw, SWITCH_UNTIL));
+ else {
+ qid = do_wait(player, cause, arg_left, arg_right, SW_ISSET(sw, SWITCH_UNTIL), 0);
+ atr_add(player, "QID", tprintf("%d", qid), player, 0);
+ }
}
COMMAND (cmd_wall) {