54698 {
54699
54700
54701
54702
54703
54704
54705
54706
54707
54708
54709
54710
54711
54712
54713
54714
54715
54716
54717
54718
54719
54720
54721
54722
54723
54724
54725
54726
54727
54728
54729
54730
54731
54732
54733
54734
54735
54736
54737
54738
54739
54740
54741
54742
54743
54744
54745
54746
54747
54748
54749
54750
54751
54752
54753
54754
54755
54756
54757
54758
54759
54760
54761
54762
54763
54764
54765
54766
54767 if (Main.netMode != 1 && !Main.player[
owner].active)
54768 {
54771 Point point =
base.Center.ToTileCoordinates();
54772 Point
end =
default(Point);
54774 Point
start =
default(Point);
54778 return;
54779 }
54783 {
54787 }
54789 {
54793 velocity.Y = -3
f * (1
f -
num8) + (
float)(-32 *
num9);
54796 {
54797 for (int i = 0; i < 30; i++)
54798 {
54799 Dust dust = Dust.NewDustDirect(
base.TopLeft +
new Vector2(-6
f, 0
f), 24, 16, 27, 0
f, 0
f, 150, Color.Transparent, 0.6f);
54800 dust.velocity *= 1
f;
54801 dust.velocity.X *= 0.5f;
54802 dust.velocity.Y = -3
f;
54803 dust.fadeIn = 1.2f;
54804 dust.noGravity = true;
54805 dust.position.X += Main.rand.NextFloatDirection() * 8
f;
54806 dust.velocity = Utils.RotatedBy(
new Vector2(0
f, -1
f), (
float)
Math.PI / 4
f * Main.rand.NextFloatDirection() * 0
f) * (Main.rand.NextFloatDirection() * 9
f);
54807 if (dust.velocity.Y < 0
f)
54808 {
54809 dust.velocity.Y *= 1
f + Main.rand.NextFloat() * 3
f;
54810 }
54811 }
54812 }
54814 if ((Main.rand.Next(6) == 0 ||
num9 > 0) && !
flag)
54815 {
54816 Dust
dust2 = Dust.NewDustDirect(
base.TopLeft +
new Vector2(-6
f, 0
f), 24, 16, 27, 0
f, 0
f, 150, Color.Transparent, 0.6f);
54817 dust2.velocity *= 1
f;
54818 dust2.velocity.X *= 0.5f;
54819 dust2.velocity.Y = -3
f;
54820 dust2.fadeIn = 1.2f;
54821 dust2.noGravity = true;
54822 }
54825 {
54828 {
54830 }
54831 }
54832 if (Main.myPlayer ==
owner)
54833 {
54836 Point
point2 =
base.Center.ToTileCoordinates();
54837 Point
point3 =
default(Point);
54839 Point
point4 =
default(Point);
54841 bool flag2 = point4.Y - point3.Y >=
num6;
54844 {
54846 }
54848 {
54850 {
54851 if (Main.tile[x,
num11].active() && !Main.tileCut[Main.tile[x,
num11].type] && Main.tile[x,
num11].type != 504)
54852 {
54854 break;
54855 }
54856 }
54857 }
54859 {
54862 {
54864 {
54866 if (Main.netMode == 1)
54867 {
54868 NetMessage.SendData(17, -1, -1,
null, 1, x,
num13, 504
f);
54869 }
54870 }
54871 }
54875 base.Top =
new Vector2((
float)(x * 16 + 8), (
float)(
point3.Y * 16 + 16));
54877 }
54878 }
54879 }
54881 {
54882 return;
54883 }
54888 Point
point5 =
base.Center.ToTileCoordinates();
54889 Point
end2 =
default(Point);
54891 Point
start2 =
default(Point);
54895 {
54898 {
54900 if (tile.active() && tile.type == 504)
54901 {
54903 }
54904 }
54905 }
54906 else
54907 {
54909 {
54911 if (
tile2.active() && tile2.type == 504 && Main.rand.Next(80) == 0)
54912 {
54913 Dust
dust3 = Dust.NewDustDirect(
new Vector2((
float)(
x2 * 16 - 6), (
float)(
num4 * 16)), 28, 16, 27, 0
f, 0
f, 150, Color.Transparent, 0.6f);
54914 dust3.velocity *= 1
f;
54915 dust3.velocity.X = 0
f;
54916 dust3.fadeIn = 1.2f;
54917 dust3.noGravity = true;
54918 }
54919 }
54920 }
54922 {
54924 {
54926 if (
tile3.active() && tile3.type == 504)
54927 {
54929 }
54930 }
54931 }
54933 {
54934 return;
54935 }
54937 {
54939 return;
54940 }
54941 if (Main.myPlayer ==
owner)
54942 {
54944 }
54946 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
void AI_155_SpawnRopeIn(int x, int y)
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
void AI_155_RemoveRope(Point start, Point end)
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.