From 5249fe89b6ef994b07d8b8dc1f789bfc1d7579d5 Mon Sep 17 00:00:00 2001 From: Reinder Feenstra Date: Sun, 5 Sep 2021 20:42:12 +0200 Subject: [PATCH] fix: test for board id (descendant of straight rail tile were valid too) --- server/src/board/board.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/board/board.cpp b/server/src/board/board.cpp index 75456f9e..1955c0ef 100644 --- a/server/src/board/board.cpp +++ b/server/src/board/board.cpp @@ -46,7 +46,7 @@ Board::Board(const std::weak_ptr& 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(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))