1
0

Simulators: Added area-based wakeup.

This commit is contained in:
Mattes D
2017-07-14 16:18:33 +02:00
committed by Lukas Pioch
parent 41d016cf5b
commit 167c4bf2e6
9 changed files with 93 additions and 56 deletions

View File

@@ -70,6 +70,18 @@ void cSimulatorManager::WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk
void cSimulatorManager::WakeUpArea(const cCuboid & a_Area)
{
for (cSimulators::iterator itr = m_Simulators.begin(); itr != m_Simulators.end(); ++itr)
{
itr->first->WakeUpArea(a_Area);
}
}
void cSimulatorManager::RegisterSimulator(cSimulator * a_Simulator, int a_Rate)
{
m_Simulators.push_back(std::make_pair(a_Simulator, a_Rate));