1
0

Remove the redstone solid block handler

- Remove cSolidBlockHandler
* Functionality now integrated into simulator dispatcher
* Fix door double open/close issues, arisen due to the top/bottom halves getting different power
+ Small migration to block states for redstone wire
This commit is contained in:
Tiger Wang
2020-08-08 18:22:16 +01:00
parent 2f79ab2e26
commit 40eba5244d
35 changed files with 745 additions and 582 deletions

View File

@@ -10,6 +10,90 @@
std::array<Vector3i, 5> cSimulator::GetLinkedOffsets(const Vector3i Offset)
{
if (Offset.x == -1)
{
return
{
{
{ -2, 0, 0 },
{ -1, -1, 0 },
{ -1, 1, 0 },
{ -1, 0, -1 },
{ -1, 0, 1 }
}
};
}
else if (Offset.x == 1)
{
return
{
{
{ 2, 0, 0 },
{ 1, -1, 0 },
{ 1, 1, 0 },
{ 1, 0, -1 },
{ 1, 0, 1 }
}
};
}
else if (Offset.y == -1)
{
return
{
{
{ 0, -2, 0 },
{ -1, -1, 0 },
{ 1, -1, 0 },
{ 0, -1, -1 },
{ 0, -1, 1 }
}
};
}
else if (Offset.y == 1)
{
return
{
{
{ 0, 2, 0 },
{ -1, 1, 0 },
{ 1, 1, 0 },
{ 0, 1, -1 },
{ 0, 1, 1 }
}
};
}
else if (Offset.z == -1)
{
return
{
{
{ 0, 0, -2 },
{ -1, 0, -1 },
{ 1, 0, -1 },
{ 0, -1, -1 },
{ 0, 1, -1 }
}
};
}
return
{
{
{ 0, 0, 2 },
{ -1, 0, 1 },
{ 1, 0, 1 },
{ 0, -1, 1 },
{ 0, 1, 1 }
}
};
}
void cSimulator::WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block)
{
ASSERT(a_Chunk.IsValid());