count objects

This commit is contained in:
mverch67
2025-02-24 16:20:25 +01:00
parent be3f0b7e15
commit 25869132cf
+1 -1
View File
@@ -113,8 +113,8 @@ void MapPanel::drawObject(const MapObject &obj)
auto tileIt = tiles.find(obj.point.xTile << 16 | obj.point.yTile);
if (tileIt != tiles.end()) {
MapTile &tile = *tileIt->second;
obj.draw(obj.id, tile.getX() + obj.point.xPos, tile.getY() + obj.point.yPos, MapTileSettings::getZoomLevel());
objectsOnMap++; // FIXME: counts also objects that are clipped away
obj.draw(obj.id, tile.getX() + obj.point.xPos, tile.getY() + obj.point.yPos, MapTileSettings::getZoomLevel());
} else {
obj.draw(obj.id, 0, 0, 0); // hide object
}