mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow the ABM time budget to be configurable.
This commit is contained in:
parent
7242de1d4b
commit
649211bf27
5 changed files with 9 additions and 2 deletions
|
@ -1354,8 +1354,8 @@ void ServerEnvironment::step(float dtime)
|
|||
std::shuffle(output.begin(), output.end(), m_rgen);
|
||||
|
||||
int i = 0;
|
||||
// The time budget for ABMs is 20%.
|
||||
u32 max_time_ms = m_cache_abm_interval * 1000 / 5;
|
||||
// determine the time budget for ABMs
|
||||
u32 max_time_ms = m_cache_abm_interval * 1000 * m_cache_abm_time_budget;
|
||||
for (const v3s16 &p : output) {
|
||||
MapBlock *block = m_map->getBlockNoCreateNoEx(p);
|
||||
if (!block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue