0x004C49E9
| 68 | |
| 69 | // 0x004C49E9 |
| 70 | static WallElement* getWallElement(const World::Pos2 loc, SmallZ baseZ, SmallZ clearZ, uint8_t direction) |
| 71 | { |
| 72 | auto tile = TileManager::get(loc); |
| 73 | for (auto& el : tile) |
| 74 | { |
| 75 | auto* elWall = el.as<WallElement>(); |
| 76 | if (elWall == nullptr) |
| 77 | { |
| 78 | continue; |
| 79 | } |
| 80 | if (elWall->isGhost()) |
| 81 | { |
| 82 | continue; |
| 83 | } |
| 84 | if (elWall->clearZ() < baseZ) |
| 85 | { |
| 86 | continue; |
| 87 | } |
| 88 | if (elWall->baseZ() > clearZ) |
| 89 | { |
| 90 | continue; |
| 91 | } |
| 92 | if (elWall->rotation() != direction) |
| 93 | { |
| 94 | continue; |
| 95 | } |
| 96 | return elWall; |
| 97 | } |
| 98 | return nullptr; |
| 99 | } |
| 100 | |
| 101 | static bool updateIndustrialSurface(SurfaceElement& elSurface, const World::Pos2 loc) |
| 102 | { |