Skip to content

Commit

Permalink
engine: common: cmd: consider filtered buffer privileged when we're r…
Browse files Browse the repository at this point in the history
…unning local singleplayer game
  • Loading branch information
a1batross committed Dec 20, 2024
1 parent ce06b1d commit e751092
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions engine/common/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,16 @@ Cbuf_Execute
void Cbuf_Execute( void )
{
Cbuf_ExecuteCommandsFromBuffer( &cmd_text, true, -1 );
// a1ba: unlimited commands for filtered buffer per frame

// a1ba: goldsrc limits unprivileged commands per frame to 1 here
// I don't see any sense in restricting that at this moment
// but in future we may limit this
Cbuf_ExecuteCommandsFromBuffer( &filteredcmd_text, false, -1 );

// a1ba: there is little to no sense limit privileged commands in
// local game, as client runs server code anyway
// do this for singleplayer only though, to make it easier to catch
// possible bugs during local multiplayer testing
Cbuf_ExecuteCommandsFromBuffer( &filteredcmd_text, SV_Active() && SV_GetMaxClients() == 1, -1 );
}

/*
Expand Down

0 comments on commit e751092

Please sign in to comment.