--- deliantra/Deliantra-Client/Client.xs 2006/08/19 03:57:25 1.148 +++ deliantra/Deliantra-Client/Client.xs 2006/08/19 18:18:36 1.152 @@ -1275,7 +1275,7 @@ mapcell *cell; int x, y, flags; - while (data < data_end) + while (data < data_end - 1) { flags = (data [0] << 8) + data [1]; data += 2; @@ -1482,6 +1482,7 @@ glEnd (); glDisable (GL_TEXTURE_2D); + glDisable (GL_BLEND); // top layer: overlays such as the health bar for (y = 0; y < sh; y++) @@ -1502,19 +1503,17 @@ int width = cell->stat_width * 32; int thick = sh / 28 + 1 + cell->stat_width; - glColor4ub (0, 0, 0, 127); - glRectf (px + 1, py, - px + width - 1, py + thick + 2); + glColor3ub (0, 0, 0); + glRectf (px + 1, py - thick - 2, + px + width - 1, py); - glColor4ub (cell->stat_hp, 255 - cell->stat_hp, 0, 255); + glColor3ub (cell->stat_hp, 255 - cell->stat_hp, 0); glRectf (px + 2, - py + 1, - px + width - 2 - cell->stat_hp * (width - 4) / 255, py + thick + 1); + py - thick - 1, + px + width - 2 - cell->stat_hp * (width - 4) / 255, py - 1); } } } - - glDisable (GL_BLEND); } void