Skip to content

Commit

Permalink
Don't shadow teleporters
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox committed Oct 4, 2024
1 parent 4242570 commit 6385eff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions desktop_version/src/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void mapclass::initcustommapdata(void)
shinytrinkets.clear();
teleporters.clear();

std::vector<SDL_Point> teleporters;
std::vector<SDL_Point> customteleporters;

for (size_t i = 0; i < customentities.size(); i++)
{
Expand All @@ -443,15 +443,15 @@ void mapclass::initcustommapdata(void)
SDL_Point temp;
temp.x = ent.rx;
temp.y = ent.ry;
teleporters.push_back(temp);
customteleporters.push_back(temp);
}
}

std::sort(teleporters.begin(), teleporters.end(), compareTeleporterPoints);
std::sort(customteleporters.begin(), customteleporters.end(), compareTeleporterPoints);

for (size_t i = 0; i < teleporters.size(); i++)
for (size_t i = 0; i < customteleporters.size(); i++)
{
setteleporter(teleporters[i].x, teleporters[i].y);
setteleporter(customteleporters[i].x, customteleporters[i].y);
}
}

Expand Down

0 comments on commit 6385eff

Please sign in to comment.