Commenting and cleanups
[open-adventure.git] / misc.c
diff --git a/misc.c b/misc.c
index 6db040a1fb3c0f755b3a741d5d9646845df698e5..36339289ad71b8af759dc7738fe6a78e5a32318e 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -556,6 +556,17 @@ bool get_command_input(command_t *command)
     return true;
 }
 
+void clear_command(command_t *cmd)
+/* Resets the state of the command to empty */
+{
+    cmd->verb = ACT_NULL;
+    cmd->part = unknown;
+    game.oldobj = cmd->obj;
+    cmd->obj = NO_OBJECT;
+    cmd->state = EMPTY;
+}
+
+
 void juggle(obj_t object)
 /*  Juggle an object by picking it up and putting it down again, the purpose
  *  being to get the object to the front of the chain of things at its loc. */