1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Weather support

This commit is contained in:
proller 2013-07-27 22:34:30 +04:00
parent e65d8ad655
commit 3aedfac968
23 changed files with 552 additions and 91 deletions

View file

@ -488,6 +488,14 @@ void *EmergeThread::Thread() {
if (block)
modified_blocks[p] = block;
// Update weather data in mapblock
for(std::map<v3s16, MapBlock *>::iterator
i = modified_blocks.begin();
i != modified_blocks.end(); ++i) {
map->getHeat(m_server->m_env, MAP_BLOCKSIZE*i->first ,i->second);
map->getHumidity(m_server->m_env, MAP_BLOCKSIZE*i->first, i->second);
}
// Set the modified blocks unsent for all the clients
for (std::map<u16, RemoteClient*>::iterator
i = m_server->m_clients.begin();