1
0

Redstone Megacommit [SEE DESC]

+ Updated BlockID - look for yourself
* Improved button, repeater, lever, and comparator code ->
simplification and splitting of some stuff from the redstone simulator
file
* Fixed buttons not breaking when in an invalid game state
* Fixed QueueSetBlock -> improved (AGAIN) piston code
+ Rewrote redstone simulator

Fixes: #57, #58, #205, and part of #131.
Fixes FS issues: 281, 116, and 102
This commit is contained in:
Tiger Wang
2013-11-18 22:30:34 +00:00
parent b5821998b4
commit bc1e236d54
16 changed files with 1143 additions and 1098 deletions

View File

@@ -682,18 +682,18 @@ void cChunk::ProcessQueuedSetBlocks(void)
Int64 CurrTick = m_World->GetWorldAge();
for (sSetBlockQueueVector::iterator itr = m_SetBlockQueue.begin(); itr != m_SetBlockQueue.end();)
{
if (itr->m_Tick < CurrTick)
if (itr->m_Tick <= CurrTick)
{
// Current world age is bigger than/equal to target world age - delay time reached
SetBlock(itr->m_RelX, itr->m_RelY, itr->m_RelZ, itr->m_BlockType, itr->m_BlockMeta);
itr = m_SetBlockQueue.erase(itr);
}
else
{
// Not yet
++itr;
continue;
}
else
{
// Now is the time to set the block
SetBlock(itr->m_RelX, itr->m_RelY, itr->m_RelZ, itr->m_BlockType, itr->m_BlockMeta);
itr = m_SetBlockQueue.erase(itr);
}
} // for itr - m_SetBlockQueue[]
}