Definition at line 41725 of file Player.cs.
41726 {
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745 if (!Collision.CanHit(
position,
width,
height,
ent.position,
ent.width,
ent.height) && !Collision.CanHitLine(
base.Center +
new Vector2((
float)(
direction *
width / 2),
gravDir * (
float)(-
height) / 3
f), 0, 0,
ent.Center +
new Vector2(0
f, (
float)(-
ent.height / 3)), 0, 0) && !Collision.CanHitLine(
base.Center +
new Vector2((
float)(
direction *
width / 2),
gravDir * (
float)(-
height) / 3
f), 0, 0,
ent.Center, 0, 0))
41746 {
41747 return Collision.CanHitLine(
base.Center +
new Vector2((
float)(
direction *
width / 2), 0
f), 0, 0,
ent.Center +
new Vector2(0
f, (
float)(
ent.height / 3)), 0, 0);
41748 }
41749 return true;
41750 }
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.
References Terraria.Collision.CanHit(), Terraria.Collision.CanHitLine(), Terraria.Entity.direction, Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Entity.position, and Terraria.Entity.width.
Referenced by Terraria.Player.DashMovement(), Terraria.Player.ItemCheck_MeleeHitPVP(), and Terraria.Player.ProcessHitAgainstNPC().