creature names fix

This commit is contained in:
Eduardo Bart 2011-08-30 20:51:09 -03:00
parent 4d10b0dd49
commit 2d61466263
1 changed files with 2 additions and 2 deletions

View File

@ -65,8 +65,8 @@ void Map::draw(const Rect& rect)
float verticalStretchFactor = rect.height() / (float)(NUM_VISIBLE_Y_TILES * NUM_TILE_PIXELS); float verticalStretchFactor = rect.height() / (float)(NUM_VISIBLE_Y_TILES * NUM_TILE_PIXELS);
// draw player names and health bars // draw player names and health bars
for(int x = 0; x < NUM_VISIBLE_Y_TILES; ++x) { for(int x = 0; x < NUM_VISIBLE_X_TILES; ++x) {
for(int y = 0; y <= NUM_VISIBLE_X_TILES; ++y) { for(int y = 0; y < NUM_VISIBLE_Y_TILES; ++y) {
Position tilePos = Position(m_centralPosition.x + (x - 7), m_centralPosition.y + (y - 5), m_centralPosition.z); Position tilePos = Position(m_centralPosition.x + (x - 7), m_centralPosition.y + (y - 5), m_centralPosition.z);
if(const TilePtr& tile = m_tiles[tilePos]) { if(const TilePtr& tile = m_tiles[tilePos]) {
auto& creatures = tile->getCreatures(); auto& creatures = tile->getCreatures();