Definition at line 3526 of file Collision.cs.
3527 {
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545 Vector2
vector = Position + Velocity;
3546 int num = (int)(Position.X / 16
f) - 1;
3547 int num2 = (int)((Position.X + (
float)Width) / 16
f) + 2;
3548 int num3 = (int)(Position.Y / 16
f) - 1;
3549 int num4 = (int)((Position.Y + (
float)Height) / 16
f) + 2;
3551 {
3553 }
3554 if (
num2 > Main.maxTilesX)
3555 {
3556 num2 = Main.maxTilesX;
3557 }
3559 {
3561 }
3562 if (
num4 > Main.maxTilesY)
3563 {
3564 num4 = Main.maxTilesY;
3565 }
3566 Vector2
vector2 =
default(Vector2);
3567 for (
int i =
num; i <
num2; i++)
3568 {
3570 {
3571 if (Main.tile[i,
j] !=
null && !Main.tile[i,
j].inActive() && Main.tile[i,
j].active() && (Main.tileSolid[Main.tile[i,
j].type] || (Main.tileSolidTop[Main.tile[i,
j].type] && Main.tile[i,
j].frameY == 0)))
3572 {
3573 vector2.X = i * 16;
3576 if (Main.tile[i,
j].halfBrick())
3577 {
3580 }
3581 if (
vector.X + (
float)Width >= vector2.X && vector.X <= vector2.X + 16
f && vector.Y + (float)Height >=
vector2.Y &&
vector.Y <=
vector2.Y + (
float)
num5)
3582 {
3584 }
3585 }
3586 }
3587 }
3588 }
References Terraria.WorldGen.KillTile(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Main.tileSolidTop.
Referenced by Terraria.Projectile.AI_015_HandleMovementCollision(), Terraria.Projectile.AI_015_HandleMovementCollision_Old(), Terraria.Projectile.HandleMovement(), and Terraria.Projectile.Kill().