48475 {
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48611 Vector2
center = player.RotatedRelativePoint(player.MountedCenter);
48613 player.heldProj =
whoAmI;
48614 player.MatchItemTimeToItemAnimation();
48616 bool flag = Main.player[
owner].itemAnimation < Main.player[
owner].itemAnimationMax / 3;
48617 int itemAnimationMax = player.itemAnimationMax;
48618 int itemAnimation = player.itemAnimation;
48619 int num = Main.player[
owner].itemAnimationMax / 3;
48625 bool flag2 =
false;
48628 {
48629 case 46:
48633 break;
48634 case 105:
48638 break;
48639 case 367:
48643 break;
48644 case 368:
48648 break;
48649 case 222:
48653 break;
48654 case 342:
48658 break;
48659 case 47:
48663 break;
48664 case 153:
48668 break;
48669 case 49:
48673 break;
48674 case 730:
48678 break;
48679 case 877:
48680 case 878:
48681 case 879:
48684 {
48686 }
48691 break;
48692 case 64:
48693 case 215:
48698 break;
48699 case 66:
48700 case 97:
48701 case 212:
48702 case 218:
48706 break;
48707 case 130:
48711 break;
48712 }
48718 {
48719 case 47:
48720 if (Main.player[
owner].wet && Main.rand.Next(2) == 0)
48721 {
48722 int num2 = Dust.NewDust(Main.player[
owner].position, Main.player[
owner].width, Main.player[
owner].height, 15, 0
f, 0
f, 100,
default(Color), 0.8f);
48724 obj.velocity *= 0.1f;
48725 }
48726 break;
48727 case 130:
48729 {
48731 }
48733 break;
48734 case 730:
48736 {
48740 }
48741 break;
48742 case 342:
48744 {
48746 if (Collision.CanHit(player.position, player.width, player.height,
position,
width,
height))
48747 {
48749 }
48750 }
48751 break;
48752 case 222:
48754 {
48757 }
48758 break;
48759 }
48760 if (
flag2 && player.channel && player.itemAnimation <
num)
48761 {
48762 player.SetDummyItemTime(
num);
48763 }
48766 {
48768 }
48771 {
48774 float num5 = Vector2.Dot(
velocity.SafeNormalize(Vector2.UnitX * (
float)player.direction), player.velocity.SafeNormalize(Vector2.UnitX * (
float)player.direction));
48775 float num6 = ((Vector2)(
ref player.velocity)).Length();
48777 {
48780 {
48782 }
48784 {
48786 }
48791 {
48794 }
48795 if (Main.rand.Next(
num7 + 3) == 0)
48796 {
48798 }
48799 if (Main.rand.Next(
num7) == 0)
48800 {
48802 Main.dust[
num11].noGravity =
true;
48804 obj2.velocity *= 0.25f;
48807 obj3.velocity *= 0.25f;
48808 }
48809 }
48810 }
48812 {
48813 if (Main.rand.Next(5) == 0)
48814 {
48816 }
48818 Main.dust[
num13].noGravity =
true;
48820 obj4.velocity /= 2
f;
48823 obj5.velocity /= 5
f;
48824 }
48826 {
48827 if (Main.rand.Next(5) == 0)
48828 {
48830 dust.noGravity = true;
48831 dust.velocity *= 1.4f;
48832 }
48833 if (Main.rand.Next(5) == 0)
48834 {
48836 }
48837 }
48838 else if (
type == 105)
48839 {
48840 if (Main.rand.Next(3) == 0)
48841 {
48846 obj7.velocity *= 0.2f;
48847 }
48848 if (Main.rand.Next(4) == 0)
48849 {
48854 obj9.velocity *= 0.5f;
48855 }
48856 }
48857 else if (
type == 153)
48858 {
48860 Main.dust[
num16].noGravity =
true;
48861 Main.dust[
num16].fadeIn = 1.25f;
48863 obj10.velocity *= 0.25f;
48864 }
48866 {
48867 Lighting.AddLight(
base.Center, 0.65f, 0.9f, 1
f);
48869 {
48873 obj11.velocity *= 0.5f;
48875 obj12.velocity +=
velocity * 0.25f;
48876 }
48877 }
48879 bool flag3 =
ai[0] >= (float)itemAnimationMax;
48881 {
48882 flag3 &= !player.channel;
48883 }
48885 {
48887 }
48888 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
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.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool AI_019_Spears_GetExtensionHitbox(out Rectangle extensionBox)
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...
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...