Allow enabling/disabling of block change limit
This commit is contained in:
parent
b02886a901
commit
8cf48f7682
|
@ -2016,7 +2016,7 @@ bool cClientHandle::CheckBlockInteractionsRate(void)
|
||||||
ASSERT(m_Player != nullptr);
|
ASSERT(m_Player != nullptr);
|
||||||
ASSERT(m_Player->GetWorld() != nullptr);
|
ASSERT(m_Player->GetWorld() != nullptr);
|
||||||
|
|
||||||
if (m_NumBlockChangeInteractionsThisTick > MAX_BLOCK_CHANGE_INTERACTIONS)
|
if ((cRoot::Get()->GetServer()->ShouldLimitPlayerBlockChanges()) && (m_NumBlockChangeInteractionsThisTick > MAX_BLOCK_CHANGE_INTERACTIONS))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,6 +236,7 @@ bool cServer::InitServer(cSettingsRepositoryInterface & a_Settings, bool a_Shoul
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ShouldAllowMultiWorldTabCompletion = a_Settings.GetValueSetB("Server", "AllowMultiWorldTabCompletion", true);
|
m_ShouldAllowMultiWorldTabCompletion = a_Settings.GetValueSetB("Server", "AllowMultiWorldTabCompletion", true);
|
||||||
|
m_ShouldLimitPlayerBlockChanges = a_Settings.GetValueSetB("AntiCheat", "LimitPlayerBlockChanges", true);
|
||||||
m_ShouldLoadOfflinePlayerData = a_Settings.GetValueSetB("PlayerData", "LoadOfflinePlayerData", false);
|
m_ShouldLoadOfflinePlayerData = a_Settings.GetValueSetB("PlayerData", "LoadOfflinePlayerData", false);
|
||||||
m_ShouldLoadNamedPlayerData = a_Settings.GetValueSetB("PlayerData", "LoadNamedPlayerData", true);
|
m_ShouldLoadNamedPlayerData = a_Settings.GetValueSetB("PlayerData", "LoadNamedPlayerData", true);
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,9 @@ public:
|
||||||
/** Returns true if authentication has been turned on in server settings. */
|
/** Returns true if authentication has been turned on in server settings. */
|
||||||
bool ShouldAuthenticate(void) const { return m_ShouldAuthenticate; } // tolua_export
|
bool ShouldAuthenticate(void) const { return m_ShouldAuthenticate; } // tolua_export
|
||||||
|
|
||||||
|
/** Returns true if limit for number of block changes per tick by a player has been turned on in server settings. */
|
||||||
|
bool ShouldLimitPlayerBlockChanges(void) const { return m_ShouldLimitPlayerBlockChanges; }
|
||||||
|
|
||||||
/** Returns true if offline UUIDs should be used to load data for players whose normal UUIDs cannot be found.
|
/** Returns true if offline UUIDs should be used to load data for players whose normal UUIDs cannot be found.
|
||||||
Loaded from the settings.ini [PlayerData].LoadOfflinePlayerData setting. */
|
Loaded from the settings.ini [PlayerData].LoadOfflinePlayerData setting. */
|
||||||
bool ShouldLoadOfflinePlayerData(void) const { return m_ShouldLoadOfflinePlayerData; }
|
bool ShouldLoadOfflinePlayerData(void) const { return m_ShouldLoadOfflinePlayerData; }
|
||||||
|
@ -224,6 +227,9 @@ private:
|
||||||
This setting is the same as the "online-mode" setting in Vanilla. */
|
This setting is the same as the "online-mode" setting in Vanilla. */
|
||||||
bool m_ShouldAuthenticate;
|
bool m_ShouldAuthenticate;
|
||||||
|
|
||||||
|
/** True if limit for number of block changes per tick by a player should be enabled. */
|
||||||
|
bool m_ShouldLimitPlayerBlockChanges;
|
||||||
|
|
||||||
/** True if offline UUIDs should be used to load data for players whose normal UUIDs cannot be found.
|
/** True if offline UUIDs should be used to load data for players whose normal UUIDs cannot be found.
|
||||||
This allows transitions from an offline (no-auth) server to an online one.
|
This allows transitions from an offline (no-auth) server to an online one.
|
||||||
Loaded from the settings.ini [PlayerData].LoadOfflinePlayerData setting. */
|
Loaded from the settings.ini [PlayerData].LoadOfflinePlayerData setting. */
|
||||||
|
|
Loading…
Reference in New Issue