mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Shrink history size to 10 soft 20 hard
This commit is contained in:
@@ -152,7 +152,7 @@ static void ProcessCompositeInput() {
|
||||
CInputBuff += CompositeInput;
|
||||
}
|
||||
// ensure history doesnt grow too far beyond a max
|
||||
static constexpr size_t MaxHistory = 30;
|
||||
static constexpr size_t MaxHistory = 10;
|
||||
if (ConsoleHistory.size() > 2 * MaxHistory) {
|
||||
std::vector<std::string> NewHistory(ConsoleHistory.begin() + ConsoleHistory.size() - MaxHistory, ConsoleHistory.end());
|
||||
ConsoleHistory = std::move(NewHistory);
|
||||
|
||||
Reference in New Issue
Block a user