forked from Mirrorlandia_minetest/minetest
default setting change, random tinkering
This commit is contained in:
parent
d10627a77f
commit
c51fef56a8
@ -50,6 +50,6 @@
|
|||||||
|
|
||||||
#active_object_range = 2
|
#active_object_range = 2
|
||||||
|
|
||||||
#max_simultaneous_block_sends_per_client = 2
|
#max_simultaneous_block_sends_per_client = 1
|
||||||
#max_simultaneous_block_sends_server_total = 4
|
#max_simultaneous_block_sends_server_total = 4
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ void set_default_settings()
|
|||||||
g_settings.set("ravines_amount", "1.0");
|
g_settings.set("ravines_amount", "1.0");
|
||||||
g_settings.set("objectdata_interval", "0.2");
|
g_settings.set("objectdata_interval", "0.2");
|
||||||
g_settings.set("active_object_range", "2");
|
g_settings.set("active_object_range", "2");
|
||||||
g_settings.set("max_simultaneous_block_sends_per_client", "2");
|
g_settings.set("max_simultaneous_block_sends_per_client", "1");
|
||||||
g_settings.set("max_simultaneous_block_sends_server_total", "4");
|
g_settings.set("max_simultaneous_block_sends_server_total", "4");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
JMutexAutoLock * waitCaches()
|
JMutexAutoLock * waitCaches()
|
||||||
{
|
{
|
||||||
dstream<<"waitCaches() begin"<<std::endl;
|
//dstream<<"waitCaches() begin"<<std::endl;
|
||||||
JMutexAutoLock waitcachelock(m_waitcache_mutex);
|
JMutexAutoLock waitcachelock(m_waitcache_mutex);
|
||||||
JMutexAutoLock *lock = new JMutexAutoLock(m_cache_mutex);
|
JMutexAutoLock *lock = new JMutexAutoLock(m_cache_mutex);
|
||||||
dstream<<"waitCaches() end"<<std::endl;
|
//dstream<<"waitCaches() end"<<std::endl;
|
||||||
return lock;
|
return lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,8 +302,10 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
|
|||||||
d_start = m_nearest_unsent_d;
|
d_start = m_nearest_unsent_d;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 maximum_simultaneous_block_sends = g_settings.getU16
|
u16 maximum_simultaneous_block_sends_setting = g_settings.getU16
|
||||||
("max_simultaneous_block_sends_per_client");
|
("max_simultaneous_block_sends_per_client");
|
||||||
|
u16 maximum_simultaneous_block_sends =
|
||||||
|
maximum_simultaneous_block_sends_setting;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check the time from last addNode/removeNode.
|
Check the time from last addNode/removeNode.
|
||||||
@ -380,13 +382,20 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
|
|||||||
|
|
||||||
Also, don't send blocks that are already flying.
|
Also, don't send blocks that are already flying.
|
||||||
*/
|
*/
|
||||||
if(d > BLOCK_SEND_DISABLE_LIMITS_MAX_D)
|
|
||||||
|
u16 maximum_simultaneous_block_sends_now =
|
||||||
|
maximum_simultaneous_block_sends;
|
||||||
|
|
||||||
|
if(d <= BLOCK_SEND_DISABLE_LIMITS_MAX_D)
|
||||||
|
maximum_simultaneous_block_sends_now =
|
||||||
|
maximum_simultaneous_block_sends_setting;
|
||||||
|
|
||||||
{
|
{
|
||||||
JMutexAutoLock lock(m_blocks_sending_mutex);
|
JMutexAutoLock lock(m_blocks_sending_mutex);
|
||||||
|
|
||||||
// Limit is dynamically lowered when building
|
// Limit is dynamically lowered when building
|
||||||
if(m_blocks_sending.size()
|
if(m_blocks_sending.size()
|
||||||
>= maximum_simultaneous_block_sends)
|
>= maximum_simultaneous_block_sends_now)
|
||||||
{
|
{
|
||||||
/*dstream<<"Not sending more blocks. Queue full. "
|
/*dstream<<"Not sending more blocks. Queue full. "
|
||||||
<<m_blocks_sending.size()
|
<<m_blocks_sending.size()
|
||||||
|
Loading…
Reference in New Issue
Block a user