PID switch on @wait command left out.
authorRick L Bird <nveid@yahoo.com>
Sun, 17 Apr 2011 06:56:44 +0000 (02:56 -0400)
committerRick L Bird <nveid@yahoo.com>
Sun, 17 Apr 2011 06:56:44 +0000 (02:56 -0400)
Fixes #48

src/cmds.c

index fd051ab394e77bc5f3855b104ba10e10351a3355..529fa72164ab1cdde06b422f6e956a7a6f79c776 100644 (file)
@@ -1052,8 +1052,12 @@ COMMAND (cmd_version) {
 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) {