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