Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Mountinater()

static void Terraria.WorldGen.Mountinater ( int i,
int j )
inlinestatic

Definition at line 69597 of file WorldGen.cs.

69598 {
69599 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
69600 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
69601 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
69602 //IL_010c: Unknown result type (might be due to invalid IL or missing references)
69603 //IL_020f: Unknown result type (might be due to invalid IL or missing references)
69604 //IL_0210: Unknown result type (might be due to invalid IL or missing references)
69605 //IL_0211: Unknown result type (might be due to invalid IL or missing references)
69606 //IL_0216: Unknown result type (might be due to invalid IL or missing references)
69607 //IL_025f: Unknown result type (might be due to invalid IL or missing references)
69608 //IL_0280: Unknown result type (might be due to invalid IL or missing references)
69609 //IL_017c: Unknown result type (might be due to invalid IL or missing references)
69610 //IL_018b: Unknown result type (might be due to invalid IL or missing references)
69611 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)
69612 //IL_02c2: Unknown result type (might be due to invalid IL or missing references)
69613 double num = genRand.Next(80, 120);
69614 double num2 = num;
69615 double num3 = genRand.Next(40, 55);
69616 if (remixWorldGen)
69617 {
69618 num2 *= 1.5;
69619 num3 *= 1.5;
69620 }
69621 Vector2D val = default(Vector2D);
69622 val.X = i;
69623 val.Y = (double)j + num3 / 2.0;
69624 Vector2D val2 = default(Vector2D);
69625 val2.X = (double)genRand.Next(-10, 11) * 0.1;
69626 val2.Y = (double)genRand.Next(-20, -10) * 0.1;
69627 while (num > 0.0 && num3 > 0.0)
69628 {
69629 num -= (double)genRand.Next(4);
69630 num3 -= 1.0;
69631 int num4 = (int)(val.X - num * 0.5);
69632 int num5 = (int)(val.X + num * 0.5);
69633 int num6 = (int)(val.Y - num * 0.5);
69634 int num7 = (int)(val.Y + num * 0.5);
69635 if (num4 < 0)
69636 {
69637 num4 = 0;
69638 }
69639 if (num5 > Main.maxTilesX)
69640 {
69641 num5 = Main.maxTilesX;
69642 }
69643 if (num6 < 0)
69644 {
69645 num6 = 0;
69646 }
69647 if (num7 > Main.maxTilesY)
69648 {
69649 num7 = Main.maxTilesY;
69650 }
69651 num2 = num * (double)genRand.Next(80, 120) * 0.01;
69652 for (int k = num4; k < num5; k++)
69653 {
69654 for (int l = num6; l < num7; l++)
69655 {
69656 double num8 = Math.Abs((double)k - val.X);
69657 double num9 = Math.Abs((double)l - val.Y);
69658 if (Math.Sqrt(num8 * num8 + num9 * num9) < num2 * 0.4 && !Main.tile[k, l].active())
69659 {
69660 Main.tile[k, l].active(active: true);
69661 Main.tile[k, l].type = 0;
69662 }
69663 }
69664 }
69665 val += val2;
69666 val2.X += (double)genRand.Next(-10, 11) * 0.05;
69667 val2.Y += (double)genRand.Next(-10, 11) * 0.05;
69668 if (val2.X > 0.5)
69669 {
69670 val2.X = 0.5;
69671 }
69672 if (val2.X < -0.5)
69673 {
69674 val2.X = -0.5;
69675 }
69676 if (val2.Y > -0.5)
69677 {
69678 val2.Y = -0.5;
69679 }
69680 if (val2.Y < -1.5)
69681 {
69682 val2.Y = -1.5;
69683 }
69684 }
69685 }
static double Sqrt(double d)
static double Abs(double value)
static bool remixWorldGen
Definition WorldGen.cs:1148
static UnifiedRandom genRand
Definition WorldGen.cs:1215

References System.Math.Abs(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, System.Math.Sqrt(), Terraria.Main.tile, ReLogic.Utilities.Vector2D.X, and ReLogic.Utilities.Vector2D.Y.

Referenced by Terraria.WorldGen.GenerateWorld().