| 750 | |
| 751 | |
| 752 | void cChunk::CheckBlocks() |
| 753 | { |
| 754 | if (m_ToTickBlocks.size() == 0) |
| 755 | { |
| 756 | return; |
| 757 | } |
| 758 | std::vector<unsigned int> ToTickBlocks; |
| 759 | std::swap(m_ToTickBlocks, ToTickBlocks); |
| 760 | |
| 761 | cChunkInterface ChunkInterface(m_World->GetChunkMap()); |
| 762 | cBlockInServerPluginInterface PluginInterface(*m_World); |
| 763 | |
| 764 | for (std::vector<unsigned int>::const_iterator itr = ToTickBlocks.begin(), end = ToTickBlocks.end(); itr != end; ++itr) |
| 765 | { |
| 766 | unsigned int index = (*itr); |
| 767 | Vector3i BlockPos = IndexToCoordinate(index); |
| 768 | |
| 769 | cBlockHandler * Handler = BlockHandler(GetBlock(index)); |
| 770 | Handler->Check(ChunkInterface, PluginInterface, BlockPos.x, BlockPos.y, BlockPos.z, *this); |
| 771 | } // for itr - ToTickBlocks[] |
| 772 | } |
| 773 | |
| 774 | |
| 775 |
nothing calls this directly
no test coverage detected