65687 {
65688
65689
65690
65691
65692
65693
65694
65695
65696
65697
65698
65699
65700
65701
65702
65703
65704
65705
65706
65707
65708
65709
65710
65711
65712
65713
65714
65715
65716
65717
65718
65719
65720 double num =
genRand.Next(15, 26);
65721 bool flag = true;
65725 if (velocity.
Y < 0.0)
65726 {
65728 }
65729 while (flag)
65730 {
65731 num += (double)
genRand.Next(-50, 51) * 0.02;
65732 if (num < 15.0)
65733 {
65734 num = 15.0;
65735 }
65736 if (num > 25.0)
65737 {
65738 num = 25.0;
65739 }
65740 for (
int i = (
int)(position.
X - num / 2.0); (double)i < position.
X + num / 2.0;
i++)
65741 {
65742 for (
int j = (
int)(position.Y - num / 2.0); (double)
j < position.
Y + num / 2.0;
j++)
65743 {
65747 if (
num5 < num * 0.2)
65748 {
65749 Main.tile[
i,
j].active(active:
false);
65750 Main.tile[
i,
j].wall = 83;
65751 }
65752 else if (
num5 < num * 0.5 && Main.tile[i,
j].wall != 83)
65753 {
65754 Main.tile[
i,
j].active(active:
true);
65755 Main.tile[
i,
j].type = 203;
65756 if (
num5 < num * 0.4)
65757 {
65758 Main.tile[
i,
j].wall = 83;
65759 }
65760 }
65761 }
65762 }
65763 velocity.X += (double)
genRand.Next(-50, 51) * 0.05;
65764 velocity.Y += (double)
genRand.Next(-50, 51) * 0.05;
65765 if (velocity.
Y < val.
Y - 0.75)
65766 {
65767 velocity.Y = val.Y - 0.75;
65768 }
65769 if (velocity.
Y > val.
Y + 0.75)
65770 {
65771 velocity.Y = val.Y + 0.75;
65772 }
65773 if (velocity.
X < val.
X - 0.75)
65774 {
65775 velocity.X = val.X - 0.75;
65776 }
65777 if (velocity.
X > val.
X + 0.75)
65778 {
65779 velocity.X = val.X + 0.75;
65780 }
65781 position += velocity;
65783 {
65784 flag = false;
65785 }
65786 }
65789 }
static double Sqrt(double d)
static double Abs(double value)
static UnifiedRandom genRand