41850 {
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41900 if (player.dead)
41901 {
41903 }
41904 if (
owner == Main.myPlayer)
41905 {
41906 if (
position.Y - (
float)
height <= (
float)(16 * Main.offScreenRange / 2))
41907 {
41909 return;
41910 }
41911 if (player.HeldItem.type != 5451)
41912 {
41914 }
41915 bool flag2 = player.gravDir == -1
f;
41917 Player.DirectionalInputSyncCache
localInputCache = player.LocalInputCache;
41924 {
41927 }
41928 Main.DroneCameraTracker.Track(this);
41929 }
41931 {
41933 return;
41934 }
41943 {
41945 }
41946 bool flag6 = velocity.Y == 0
f;
41949 {
41951 }
41953 {
41955 }
41961 {
41964 }
41966 {
41967 activeSound.Volume =
num5;
41968 activeSound.Position =
base.Center;
41969 activeSound.Pitch = Utils.Clamp(Utils.Remap(
localAI[1], 0
f, 100
f, -1
f, 1
f) +
num4, -1
f, 1
f);
41970 }
41971 float num6 = 0.15f;
41973 {
41975 velocity.X *= 0.97f;
41977 {
41981 }
41982 }
41983 else
41984 {
41990 {
41992 velocity.X *= 0.97f;
41994 }
41995 }
41996 velocity.Y +=
num6;
41999 {
42000 velocity.Y *= 0.95f;
42001 }
42003 {
42005 }
42006 Lighting.AddLight(
base.Center, Vector3.One * 0.3f);
42009 {
42014 Vector2
vector4 =
default(Vector2);
42015 for (
int i = 0; i <
num10; i++)
42016 {
42021 {
42022 break;
42023 }
42024 }
42026 {
42027 for (
int j = 0;
j < 2;
j++)
42028 {
42029 if (!(Main.rand.NextFloat() < 0.66f))
42030 {
42032 Vector2 value = Main.rand.NextVector2CircularEdge(2.5
f, 1
f) * 0.5f;
42034 {
42036 }
42037 Dust.NewDustPerfect(
val, (Main.rand.Next(2) == 0) ? 31 : 16, value, 127);
42038 }
42039 }
42040 }
42041 }
42042 if (Main.netMode == 2 && Main.player.IndexInRange(
owner) && Main.player[
owner].active)
42043 {
42045 }
42046 }
static SlotId PlayTrackedLoopedSound(in SoundStyle style, Vector2 position, Func< bool >? loopingCondition=null)
static ? ActiveSound GetActiveSound(SlotId slotId)
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle JimsDrone
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...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...