+ if (0 < thing->lifepoints)
+ {
+ if (0 == thing->command)
+ {
+ if (thing == player)
+ {
+ break;
+ }
+ ai(thing);
+ }
+ thing->progress++;
+
+ struct ThingAction * ta = get_thing_action(thing->command);
+ if (thing->progress == ta->effort)
+ {
+ ta->func(thing);
+ thing->command = 0;
+ thing->progress = 0;
+ }
+ }
+ thing = thing->next;
+ }
+}
+
+
+
+static void record_msg(char * msg)
+{
+ char * path_tmp;
+ FILE * file_tmp = atomic_write_start(s[S_PATH_RECORD], &path_tmp);
+ if (!access(s[S_PATH_RECORD], F_OK))
+ {
+ FILE * file_read = try_fopen(s[S_PATH_RECORD], "r", __func__);
+ uint32_t linemax = textfile_width(file_read);
+ char * line = try_malloc(linemax + 1, __func__);
+ while (try_fgets(line, linemax + 1, file_read, __func__))
+ {
+ try_fwrite(line, strlen(line), 1, file_tmp, __func__);
+ }
+ free(line);
+ try_fclose(file_read, __func__);
+ }
+ try_fwrite(msg, strlen(msg), 1, file_tmp, __func__);
+ try_fputc('\n', file_tmp, __func__);
+ atomic_write_finish(file_tmp, s[S_PATH_RECORD], path_tmp);
+}
+
+
+
+extern void obey_msg(char * msg, uint8_t do_record, uint8_t do_verbose)
+{
+ if (world.is_verbose && do_verbose)
+ {
+ exit_trouble(-1 == printf("Input: %s\n", msg), __func__, "printf");