diff options
Diffstat (limited to 'source/cSandSimulator.cpp')
-rw-r--r-- | source/cSandSimulator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/cSandSimulator.cpp b/source/cSandSimulator.cpp index b25b498c5..77f206b52 100644 --- a/source/cSandSimulator.cpp +++ b/source/cSandSimulator.cpp @@ -51,6 +51,9 @@ bool cSandSimulator::IsAllowedBlock( char a_BlockID ) void cSandSimulator::AddBlock(int a_X, int a_Y, int a_Z)
{
+ if(!IsAllowedBlock(m_World->GetBlock(a_X, a_Y, a_Z))) //This should save very much time because it doesn´t have to iterate through all blocks
+ return;
+
Vector3i *Block = new Vector3i(a_X, a_Y, a_Z);
//check for duplicates
|