It is possible to create endless loops in the game engine by using
recursive custom element properties. These endless loops are detected
and the user is notified by a request dialog about this problem to be
able to stop the running game. When auto-testing tapes on the command
line, answering a graphical request dialog is not possible, which
causes the program to hang.
This fix stops replaying the tape in this case (and skips the request
dialog), so auto-testing tapes can continue (with an unsolvable tape).
Warn("element '%s' caused endless loop in game engine",
EL_NAME(recursion_loop_element));
- RequestQuitGameExt(FALSE, level_editor_test_game, message);
+ RequestQuitGameExt(program.headless, level_editor_test_game, message);
recursion_loop_detected = FALSE; // if game should be continued