fix: test for board id (descendant of straight rail tile were valid too)

Dieser Commit ist enthalten in:
Reinder Feenstra 2021-09-05 20:42:12 +02:00
Ursprung ea3e667caa
Commit 5249fe89b6

Datei anzeigen

@ -46,7 +46,7 @@ Board::Board(const std::weak_ptr<World>& world, std::string_view _id) :
if(auto it = m_tiles.find(l); it != m_tiles.end())
{
if(!replace && classId == StraightRailTile::classId && std::dynamic_pointer_cast<StraightRailTile>(it->second)) // merge to bridge
if(!replace && classId == StraightRailTile::classId && it->second->tileId() == TileId::RailStraight) // merge to bridge
{
const TileRotate tileRotate = it->second->rotate;
if((tileRotate == rotate + TileRotate::Deg90 || tileRotate == rotate - TileRotate::Deg90) && deleteTile(x, y))