TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CanHitWithMeleeWeapon()

bool Terraria.Projectile.CanHitWithMeleeWeapon ( Entity ent)
inline

Definition at line 11486 of file Projectile.cs.

11487 {
11488 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
11489 //IL_0022: Unknown result type (might be due to invalid IL or missing references)
11490 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
11491 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
11492 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
11493 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
11494 //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
11495 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
11496 //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
11497 //IL_010a: Unknown result type (might be due to invalid IL or missing references)
11498 //IL_0160: Unknown result type (might be due to invalid IL or missing references)
11499 //IL_0165: Unknown result type (might be due to invalid IL or missing references)
11500 //IL_016d: Unknown result type (might be due to invalid IL or missing references)
11501 //IL_0187: Unknown result type (might be due to invalid IL or missing references)
11502 //IL_01b7: Unknown result type (might be due to invalid IL or missing references)
11503 //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
11504 //IL_01c4: Unknown result type (might be due to invalid IL or missing references)
11505 //IL_01d7: Unknown result type (might be due to invalid IL or missing references)
11506 //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
11507 if (Distance(ent.Center) > ownerHitCheckDistance)
11508 {
11509 return false;
11510 }
11511 if (!Collision.CanHit(Main.player[owner].position, Main.player[owner].width, Main.player[owner].height, ent.position, ent.width, ent.height) && !Collision.CanHitLine(Main.player[owner].Center + new Vector2((float)(Main.player[owner].direction * Main.player[owner].width / 2), Main.player[owner].gravDir * (float)(-Main.player[owner].height) / 3f), 0, 0, ent.Center + new Vector2(0f, (float)(-ent.height / 3)), 0, 0) && !Collision.CanHitLine(Main.player[owner].Center + new Vector2((float)(Main.player[owner].direction * Main.player[owner].width / 2), Main.player[owner].gravDir * (float)(-Main.player[owner].height) / 3f), 0, 0, ent.Center, 0, 0))
11512 {
11513 return Collision.CanHitLine(Main.player[owner].Center + new Vector2((float)(Main.player[owner].direction * Main.player[owner].width / 2), 0f), 0, 0, ent.Center + new Vector2(0f, (float)(ent.height / 3)), 0, 0);
11514 }
11515 return true;
11516 }
float Distance(Vector2 Other)
Definition Entity.cs:275
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...

References Terraria.Collision.CanHit(), Terraria.Collision.CanHitLine(), Terraria.Entity.Distance(), Terraria.Projectile.owner, Terraria.Projectile.ownerHitCheckDistance, and Terraria.Main.player.

Referenced by Terraria.Projectile.BombsHurtPlayers(), and Terraria.Projectile.Damage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: