]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
MVM: fix endless loop when a command causes an error
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 25 Feb 2024 22:34:08 +0000 (08:34 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 25 Feb 2024 22:45:22 +0000 (08:45 +1000)
7e1f7d12f57c064a6855d9850d28387ca6092c45 should have included this.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
menu.c

diff --git a/menu.c b/menu.c
index 891ebe1ed6133fc95835d49db11a68b691fe83ed..92e95ed1f0b60811f5312f00636790de5bc3cb59 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -5246,6 +5246,9 @@ void MVM_error_cmd(const char *format, ...)
        // reset the active scene, too (to be on the safe side ;))
        R_SelectScene( RST_CLIENT );
 
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
+
        // Let video start at least
        Host_AbortCurrentFrame();
 }