mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Weather: Clean up getHeat/getHumidity somewhat
This commit is contained in:
parent
c9eb17aba3
commit
9bccd75e34
13 changed files with 143 additions and 77 deletions
|
@ -512,8 +512,7 @@ void *EmergeThread::Thread() {
|
|||
ign(&m_server->m_ignore_map_edit_events_area,
|
||||
VoxelArea(minp, maxp));
|
||||
{ // takes about 90ms with -O1 on an e3-1230v2
|
||||
m_server->getScriptIface()->
|
||||
environment_OnGenerated(
|
||||
m_server->getScriptIface()->environment_OnGenerated(
|
||||
minp, maxp, emerge->getBlockSeed(minp));
|
||||
}
|
||||
|
||||
|
@ -535,14 +534,6 @@ 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue