1
0

Little improvement to save some cpu time but it´s still very heavy cpu load

git-svn-id: http://mc-server.googlecode.com/svn/trunk@141 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
lapayo94@gmail.com
2011-12-28 02:38:00 +00:00
parent 1e9af56a67
commit e3be6b1a47
2 changed files with 8 additions and 1 deletions

View File

@@ -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