55313 {
55314
55315
55316
55317
55318
55319
55320
55321
55322
55323
55324
55325
55326
55327
55328
55329
55330
55331
55332
55333
55334
55335
55336
55337
55338
55339
55340
55341
55342
55343
55344
55345
55346
55347
55348
55349
55350
55351
55352
55353
55354
55355
55356
55357
55358
55359
55360
55361
55362
55363
55364
55365
55366
55367
55368
55369
55370
55371
55372
55373
55374
55375
55376
55377
55378
55379
55380
55381
55382
55383
55384
55385
55386
55387
55388 if (Main.player[
owner].dead || Main.player[
owner].stoned || Main.player[
owner].webbed || Main.player[
owner].frozen)
55389 {
55391 return;
55392 }
55394 Vector2
vector =
default(Vector2);
55396 float num = mountedCenter.X -
vector.X;
55400 if (
ai[0] == 2
f &&
type == 865)
55401 {
55405 }
55406 if (Main.myPlayer ==
owner)
55407 {
55411 {
55413 if (Main.netMode != 0)
55414 {
55415 NetMessage.SendData(17, -1, -1,
null, 20,
num16,
num17);
55416 }
55417 }
55418 }
55420 {
55422 }
55424 {
55426 }
55428 {
55432 {
55434 }
55435 DelegateMethods.v3_1 =
new Vector3(0
f, 0.4
f, 0.3
f);
55437 }
55439 {
55442 {
55444 }
55445 }
55447 {
55448 Vector3
vector2 = Vector3.Zero;
55450 {
55451 case 646:
55453 break;
55454 case 647:
55456 break;
55457 case 648:
55459 break;
55460 case 649:
55462 break;
55463 }
55466 DelegateMethods.v3_1 =
vector2;
55468 }
55470 {
55472 {
55474 }
55475 else if (
type >= 230 &&
type <= 235)
55476 {
55479 {
55481 }
55482 }
55483 else if (
type == 753)
55484 {
55487 {
55489 }
55490 }
55492 {
55494 }
55495 Vector2
vector3 = base.Center -
new Vector2(5
f);
55496 Vector2
val = base.Center +
new Vector2(5
f);
55497 Point point = (
vector3 -
new Vector2(16
f)).ToTileCoordinates();
55498 Point
val2 = (
val +
new Vector2(32
f)).ToTileCoordinates();
55499 int num2 = point.X;
55501 int num4 = point.Y;
55504 {
55506 }
55507 if (
num3 > Main.maxTilesX)
55508 {
55509 num3 = Main.maxTilesX;
55510 }
55512 {
55514 }
55515 if (
num5 > Main.maxTilesY)
55516 {
55517 num5 = Main.maxTilesY;
55518 }
55521 Point
point2 =
default(Point);
55522 for (int i = 0; i < player.grapCount; i++)
55523 {
55524 Projectile projectile = Main.projectile[player.grappling[i]];
55525 if (projectile.aiStyle != 7 || projectile.ai[0] != 2
f)
55526 {
55527 continue;
55528 }
55529 Point
pt = projectile.Center.ToTileCoordinates();
55532 {
55533 continue;
55534 }
55535 for (
int j = -2;
j <= 2;
j++)
55536 {
55537 for (
int k = -2;
k <= 2;
k++)
55538 {
55542 {
55544 }
55545 }
55546 }
55547 }
55548 Vector2
vector4 =
default(Vector2);
55550 {
55552 {
55553 if (Main.tile[
l,
m] ==
null)
55554 {
55555 Main.tile[
l,
m] =
default(
Tile);
55556 }
55557 vector4.X =
l * 16;
55558 vector4.Y =
m * 16;
55560 {
55561 continue;
55562 }
55563 Tile tile = Main.tile[
l,
m];
55565 {
55566 continue;
55567 }
55568 if (Main.player[
owner].grapCount < 10)
55569 {
55571 Main.player[
owner].grapCount++;
55572 }
55573 if (Main.myPlayer !=
owner)
55574 {
55575 continue;
55576 }
55581 {
55582 for (
int n = 0;
n < 1000;
n++)
55583 {
55584 if (
n !=
whoAmI && Main.projectile[
n].active && Main.projectile[
n].owner ==
owner && Main.projectile[
n].aiStyle == 7 && Main.projectile[
n].ai[0] == 2
f)
55585 {
55586 Main.projectile[
n].Kill();
55587 }
55588 }
55589 }
55590 else
55591 {
55594 {
55596 }
55598 {
55600 }
55602 {
55604 }
55606 {
55608 }
55610 {
55612 }
55615 {
55616 if (Main.projectile[
num10].active && Main.projectile[
num10].owner ==
owner && Main.projectile[
num10].aiStyle == 7)
55617 {
55618 if (Main.projectile[
num10].timeLeft <
num8)
55619 {
55621 num8 = Main.projectile[
num10].timeLeft;
55622 }
55624 }
55625 }
55627 {
55628 Main.projectile[
num7].Kill();
55629 }
55630 }
55636 position.X =
l * 16 + 8 -
width / 2;
55637 position.Y =
m * 16 + 8 -
height / 2;
55640 {
55642 base.Center = ((Rectangle)(
ref value)).
Center.ToVector2();
55643 }
55646 if (Main.myPlayer ==
owner)
55647 {
55649 {
55650 Main.player[
owner].DoQueenSlimeHookTeleport(
base.Center);
55651 }
55652 NetMessage.SendData(13, -1, -1,
null,
owner);
55653 }
55654 break;
55655 }
55657 {
55658 break;
55659 }
55660 }
55661 }
55662 else if (
ai[0] == 1
f)
55663 {
55666 {
55668 }
55670 {
55672 }
55674 {
55676 }
55678 {
55680 }
55682 {
55684 }
55686 {
55688 }
55690 {
55692 }
55694 {
55696 }
55698 {
55700 }
55702 {
55704 }
55706 {
55708 }
55711 {
55713 }
55718 velocity.Y =
num12;
55719 }
55720 else if (
ai[0] == 2
f)
55721 {
55722 Point
point3 =
base.Center.ToTileCoordinates();
55724 {
55726 }
55729 {
55731 }
55733 {
55735 }
55736 else if (Main.player[
owner].grapCount < 10)
55737 {
55739 Main.player[
owner].grapCount++;
55740 }
55741 }
55742 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
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 bool[] CrackedBricks
static void GrappleRetreatSpeed(Projectile projectile, Player player, ref float speed)
static bool GrappleOutOfRange(float distance, Projectile projectile)
static void NumGrappleHooks(Projectile projectile, Player player, ref int numHooks)
This serves as the central class from which projectile-related functions are carried out....
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....
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 frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
bool AI_007_GrapplingHooks_CanTileBeLatchedOnTo(int x, int y)
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.