Fix train rails with custom blocks.

This commit is contained in:
UnknownShadow200 2017-09-23 22:41:26 +10:00
parent 7fde09b296
commit 48f3e1486d

View File

@ -35,7 +35,7 @@ namespace MCGalaxy.Blocks.Physics {
{ {
ExtBlock below = lvl.GetBlock((ushort)(x + dx),(ushort)(y + dy - 1), (ushort)(z + dz)); ExtBlock below = lvl.GetBlock((ushort)(x + dx),(ushort)(y + dy - 1), (ushort)(z + dz));
ExtBlock block = lvl.GetBlock((ushort)(x + dx), (ushort)(y + dy), (ushort)(z + dz)); ExtBlock block = lvl.GetBlock((ushort)(x + dx), (ushort)(y + dy), (ushort)(z + dz));
bool isRails = lvl.Props[below.BlockID].IsRails; bool isRails = lvl.Props[below.Index].IsRails;
if (isRails && (block.BlockID == Block.Air || block.BlockID == Block.Water) if (isRails && (block.BlockID == Block.Air || block.BlockID == Block.Water)
&& !lvl.listUpdateExists.Get(x + dx, y + dy, z + dz)) { && !lvl.listUpdateExists.Get(x + dx, y + dy, z + dz)) {