Skip to content

Commit 5ba792d

Browse files
committed
fix: orange kick by restart_level
Pretty jank method, but seems to work just fine. Rejects usage of restart_level while waiting for orange to load Fixes #300
1 parent 0355c46 commit 5ba792d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Modules/Engine.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,11 @@ const ConCommandBase *Cmd_ExecuteCommand_Detour(int eTarget, const CCommand &com
765765
cmd.erase(0, cmd.find_first_not_of(" \t"));
766766
console->Print("Cmd_ExecuteCommand (%s) target: %d slot: %d\n", cmd.c_str(), eTarget, nClientSlot);
767767
}
768+
if (command.ArgC() >= 1 && !strcmp(command.Arg(0), "restart_level") &&
769+
engine->IsCoop() && !engine->IsOrange() &&
770+
(g_partnerHasSAR && !g_orangeReady)) {
771+
return 0;
772+
}
768773
Cmd_ExecuteCommand_Hook.Disable();
769774
auto ret = g_Cmd_ExecuteCommand(eTarget, command, nClientSlot);
770775
Cmd_ExecuteCommand_Hook.Enable();

0 commit comments

Comments
 (0)