Progress on Rewrite

Completed exit door code. Also fixed noise calculation for dungeon door
destinations - we were attempting to use pack depth in the calculation
before it had been initialized.
This commit is contained in:
SenseiKiwi
2013-09-07 12:27:28 -04:00
parent 06c90572f1
commit 07a5e2a64d
4 changed files with 164 additions and 64 deletions

View File

@@ -87,7 +87,7 @@ public class PocketBuilder
if (packConfig != null && packConfig.doDistortDoorCoordinates())
{
destination = calculateNoisyDestination(source, dimension, orientation);
destination = calculateNoisyDestination(source, dimension, dungeon, orientation);
}
else
{
@@ -111,9 +111,9 @@ public class PocketBuilder
}
}
private static Point3D calculateNoisyDestination(Point4D source, NewDimData dimension, int orientation)
private static Point3D calculateNoisyDestination(Point4D source, NewDimData dimension, DungeonData dungeon, int orientation)
{
int depth = dimension.packDepth();
int depth = NewDimData.calculatePackDepth(dimension.parent(), dungeon);
int forwardNoise = MathHelper.getRandomIntegerInRange(random, -50 * depth, 150 * depth);
int sidewaysNoise = MathHelper.getRandomIntegerInRange(random, -10 * depth, 10 * depth);