Skip to content

Commit

Permalink
fix: clientcmd restrictions from game update
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisAMJ committed Feb 3, 2024
1 parent 2eb1b68 commit 86f3ed6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Modules/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ REDECL(Engine::ParseSmoothingInfo_Mid_Trampoline);
#endif

void Engine::ExecuteCommand(const char *cmd, bool immediately) {
this->Cbuf_AddText(0, cmd, 0); // kCommandSrcCode (source 0) has no restrictions
if (immediately) {
this->ExecuteClientCmd(this->engineClient->ThisPtr(), cmd);
} else {
this->ClientCmd(this->engineClient->ThisPtr(), cmd);
// HACKHACK: This effectively just does Cbuf_Execute, could we get at that by itself?
this->ExecuteClientCmd(this->engineClient->ThisPtr(), "");
}
}
int Engine::GetTick() {
Expand Down

0 comments on commit 86f3ed6

Please sign in to comment.