Mushroom shrine no longer generates too close to the center of the world in Gfb

This commit is contained in:
Storm2103 committed 2023-08-01 16:13:34 -06:00
1 parent 4cc1c7343a
commit fdf8a967ef
1 file changed
+10
+10
View File
@@ -499,8 +499,18 @@ namespace CalamityMod.World
{
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.2f), (int)(Main.maxTilesY * 0.85f));
// Gfb
if (Main.getGoodWorld)
{
// Ensure that the shrine doesn't generate too close to the center of the world
do
{
placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f));
}
while (placementPositionX > (int)(Main.maxTilesX * 0.4f) && placementPositionX < (int)(Main.maxTilesX * 0.6f));
placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.8f), (int)(Main.maxTilesY * 0.85f)); //Mushroom layer
}
Point placementPoint = new Point(placementPositionX, placementPositionY);