| 163 | } |
| 164 | |
| 165 | void TileObject::addToDrawnTiles(Tile *tile) |
| 166 | { |
| 167 | this->drawOnTile = tile; |
| 168 | int layer = map.getLayer(this->type); |
| 169 | this->drawOnTile->drawnObjects[layer].push_back(shared_from_this()); |
| 170 | std::sort(this->drawOnTile->drawnObjects[layer].begin(), |
| 171 | this->drawOnTile->drawnObjects[layer].end(), TileObjectZComparer{}); |
| 172 | } |
| 173 | |
| 174 | } // namespace OpenApoc |