Resetting block send timer when invoking setBlock(s)NotSent()

This commit is contained in:
orwell96 2016-02-01 19:29:53 +01:00
parent e52ebda8b2
commit 90e51a3329
1 changed files with 3 additions and 1 deletions

View File

@ -391,6 +391,7 @@ void RemoteClient::SentBlock(v3s16 p)
void RemoteClient::SetBlockNotSent(v3s16 p)
{
m_nearest_unsent_d = 0;
m_nothing_to_send_pause_timer=0.1;
if(m_blocks_sending.find(p) != m_blocks_sending.end())
m_blocks_sending.erase(p);
@ -401,7 +402,8 @@ void RemoteClient::SetBlockNotSent(v3s16 p)
void RemoteClient::SetBlocksNotSent(std::map<v3s16, MapBlock*> &blocks)
{
m_nearest_unsent_d = 0;
m_nothing_to_send_pause_timer=0.1;
for(std::map<v3s16, MapBlock*>::iterator
i = blocks.begin();
i != blocks.end(); ++i)