1
0

Completely removed the old (buggy) redstone simulator.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-10-06 20:04:58 +00:00
parent 770486d2e1
commit 28332c6567
13 changed files with 344 additions and 645 deletions

View File

@@ -3,7 +3,6 @@
#include "BlockID.h"
#include "World.h"
#include "Redstone.h"
#include "ChunkDef.h"
#include "ClientHandle.h"
#include "Pickup.h"
@@ -508,24 +507,20 @@ void cWorld::Tick(float a_Dt)
m_RSList.clear();
std::vector<int>::const_iterator cii; // FIXME - Please rename this variable, WTF is cii??? Use human readable variable names or common abbreviations (i, idx, itr, iter)
for(cii=m_RSList_copy.begin(); cii!=m_RSList_copy.end();)
for (cii = m_RSList_copy.begin(); cii != m_RSList_copy.end();)
{
int tempX = *cii;cii++;
int tempY = *cii;cii++;
int tempZ = *cii;cii++;
int state = *cii;cii++;
int tempX = *cii; cii++;
int tempY = *cii; cii++;
int tempZ = *cii; cii++;
int state = *cii; cii++;
if ( (state == 11111) && ( (int)GetBlock( tempX, tempY, tempZ ) == E_BLOCK_REDSTONE_TORCH_OFF ) )
{
FastSetBlock( tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_ON, (int)GetBlockMeta( tempX, tempY, tempZ ) );
cRedstone Redstone(this);
Redstone.ChangeRedstone( tempX, tempY, tempZ, true );
}
else if ( (state == 00000) && ( (int)GetBlock( tempX, tempY, tempZ ) == E_BLOCK_REDSTONE_TORCH_ON ) )
{
FastSetBlock( tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_OFF, (int)GetBlockMeta( tempX, tempY, tempZ ) );
cRedstone Redstone(this);
Redstone.ChangeRedstone( tempX, tempY, tempZ, false );
}
}
m_RSList_copy.erase(m_RSList_copy.begin(),m_RSList_copy.end());