diff options
author | madmaxoft <github@xoft.cz> | 2014-05-05 23:05:30 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-05-05 23:05:30 +0200 |
commit | 9542b0b8755e89040823632b05ef07c8e39912b8 (patch) | |
tree | 6ba5c5274ddf904c667f8ff5922d49a223d29bda /src/Generating/PieceGenerator.cpp | |
parent | Prefabs can specify that they don't want flooring. (diff) | |
download | cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar.gz cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar.bz2 cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar.lz cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar.xz cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.tar.zst cuberite-9542b0b8755e89040823632b05ef07c8e39912b8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/PieceGenerator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Generating/PieceGenerator.cpp b/src/Generating/PieceGenerator.cpp index 8e9a48be6..db45cd08b 100644 --- a/src/Generating/PieceGenerator.cpp +++ b/src/Generating/PieceGenerator.cpp @@ -388,7 +388,8 @@ bool cPieceGenerator::TryPlacePieceAtConnector( // Get a list of available connections: const int * RotTable = DirectionRotationTable[a_Connector.m_Direction]; cConnections Connections; - cPieces AvailablePieces = m_PiecePool.GetPiecesWithConnector(a_Connector.m_Type); + int WantedConnectorType = -a_Connector.m_Type; + cPieces AvailablePieces = m_PiecePool.GetPiecesWithConnector(WantedConnectorType); Connections.reserve(AvailablePieces.size()); Vector3i ConnPos = a_Connector.m_Pos; // The position at which the new connector should be placed - 1 block away from the connector AddFaceDirection(ConnPos.x, ConnPos.y, ConnPos.z, a_Connector.m_Direction); @@ -406,7 +407,7 @@ bool cPieceGenerator::TryPlacePieceAtConnector( cPiece::cConnectors Connectors = (*itrP)->GetConnectors(); for (cPiece::cConnectors::iterator itrC = Connectors.begin(), endC = Connectors.end(); itrC != endC; ++itrC) { - if (itrC->m_Type != a_Connector.m_Type) + if (itrC->m_Type != WantedConnectorType) { continue; } |