Tweaked how dungeons skip around

Dungeons send the player consistently in the direction they *face* now.
Allows for better travel using them, and also ensures that if they die,
they will be farther away.
This commit is contained in:
StevenRS11
2013-10-01 16:36:34 -04:00
parent ca07a38eff
commit d046bd88ea

View File

@@ -117,7 +117,7 @@ public class PocketBuilder
private static Point3D calculateNoisyDestination(Point4D source, NewDimData dimension, DungeonData dungeon, int orientation) private static Point3D calculateNoisyDestination(Point4D source, NewDimData dimension, DungeonData dungeon, int orientation)
{ {
int depth = NewDimData.calculatePackDepth(dimension.parent(), dungeon); int depth = NewDimData.calculatePackDepth(dimension.parent(), dungeon);
int forwardNoise = MathHelper.getRandomIntegerInRange(random, -50 * depth, 150 * depth); int forwardNoise = MathHelper.getRandomIntegerInRange(random, 10 * depth, 130 * depth);
int sidewaysNoise = MathHelper.getRandomIntegerInRange(random, -10 * depth, 10 * depth); int sidewaysNoise = MathHelper.getRandomIntegerInRange(random, -10 * depth, 10 * depth);
//Rotate the link destination noise to point in the same direction as the door exit //Rotate the link destination noise to point in the same direction as the door exit