Retocando la abadía

This commit is contained in:
2022-11-01 22:36:12 +01:00
parent cb62cb8eb0
commit 4901635bb7
20 changed files with 363 additions and 429 deletions

View File

@@ -895,7 +895,7 @@ void Room::setBottomSurfaces()
lastOne = i;
i++;
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
while (tile.at(i) == tile.at(i - 1) + 1)
{
@@ -910,7 +910,7 @@ void Room::setBottomSurfaces()
line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1;
bottomSurfaces.push_back(line);
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
if (tile.at(i) == -1)
{ // Si el siguiente elemento es un separador, hay que saltarlo
@@ -955,7 +955,7 @@ void Room::setTopSurfaces()
lastOne = i;
i++;
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
while (tile.at(i) == tile.at(i - 1) + 1)
{
@@ -970,7 +970,7 @@ void Room::setTopSurfaces()
line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1;
topSurfaces.push_back(line);
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
if (tile.at(i) == -1)
{ // Si el siguiente elemento es un separador, hay que saltarlo
@@ -1187,7 +1187,7 @@ void Room::setAutoSurfaces()
lastOne = i;
i++;
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
while (tile.at(i) == tile.at(i - 1) + 1)
{
@@ -1202,7 +1202,7 @@ void Room::setAutoSurfaces()
line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1;
autoSurfaces.push_back(line);
if (i < (int)tile.size() - 1)
if (i <= (int)tile.size() - 1)
{
if (tile.at(i) == -1)
{ // Si el siguiente elemento es un separador, hay que saltarlo