Definition at line 551 of file Collision.cs.
552 {
557 if (num <= 1)
558 {
559 num = 1;
560 }
561 if (num >= Main.maxTilesX)
562 {
563 num = Main.maxTilesX - 1;
564 }
566 {
568 }
569 if (
num3 >= Main.maxTilesX)
570 {
571 num3 = Main.maxTilesX - 1;
572 }
574 {
576 }
577 if (
num2 >= Main.maxTilesY)
578 {
579 num2 = Main.maxTilesY - 1;
580 }
582 {
584 }
585 if (
num4 >= Main.maxTilesY)
586 {
587 num4 = Main.maxTilesY - 1;
588 }
592 {
593 return true;
594 }
598 {
600 {
602 }
604 {
606 }
607 }
609 {
611 }
612 else
613 {
615 }
620 {
622 }
627 bool flag = false;
629 try
630 {
631 do
632 {
634 {
635 case 2:
636 {
641 {
642 if (Main.tile[num,
num2 - 1] ==
null)
643 {
644 return false;
645 }
646 if (Main.tile[num,
num2] ==
null)
647 {
648 return false;
649 }
650 if (Main.tile[num,
num2 + 1] ==
null)
651 {
652 return false;
653 }
657 if ((!
tile4.inActive() &&
tile4.active() && Main.tileSolid[
tile4.type] && !Main.tileSolidTop[
tile4.type]) || (!
tile5.inActive() &&
tile5.active() && Main.tileSolid[
tile5.type] && !Main.tileSolidTop[
tile5.type]) || (!
tile6.inActive() &&
tile6.active() && Main.tileSolid[
tile6.type] && !Main.tileSolidTop[
tile6.type]))
658 {
659 return false;
660 }
662 {
663 flag = true;
664 break;
665 }
669 {
671 }
672 }
674 {
676 }
677 break;
678 }
679 case 1:
680 {
684 for (
int i = 0;
i <
num16;
i++)
685 {
686 if (Main.tile[num - 1,
num2] ==
null)
687 {
688 return false;
689 }
690 if (Main.tile[num,
num2] ==
null)
691 {
692 return false;
693 }
694 if (Main.tile[num + 1,
num2] ==
null)
695 {
696 return false;
697 }
698 Tile tile = Main.tile[num - 1,
num2];
701 if ((!tile.inActive() && tile.active() && Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type]) || (!
tile2.inActive() &&
tile2.active() && Main.tileSolid[
tile2.type] && !Main.tileSolidTop[
tile2.type]) || (!
tile3.inActive() &&
tile3.active() && Main.tileSolid[
tile3.type] && !Main.tileSolidTop[
tile3.type]))
702 {
703 return false;
704 }
706 {
707 flag = true;
708 break;
709 }
713 {
715 }
716 }
718 {
720 }
721 break;
722 }
723 }
724 if (Main.tile[num,
num2] ==
null)
725 {
726 return false;
727 }
729 if (!
tile7.inActive() &&
tile7.active() && Main.tileSolid[
tile7.type] && !Main.tileSolidTop[
tile7.type])
730 {
731 return false;
732 }
733 }
734 while (!(flag ||
flag2));
735 return true;
736 }
737 catch
738 {
739 return false;
740 }
741 }
static double Abs(double value)
static int Sign(decimal value)
References System.Math.Abs(), Terraria.Tile.active(), Terraria.Tile.inActive(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, System.Math.Sign(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, and Terraria.Tile.type.
Referenced by Terraria.NPC.AI(), Terraria.Projectile.AI_001(), Terraria.NPC.AI_003_Fighters(), Terraria.NPC.AI_006_Worms(), Terraria.NPC.AI_007_TownEntities(), Terraria.Projectile.AI_026(), Terraria.Projectile.AI_062(), Terraria.Projectile.AI_100_Medusa(), Terraria.NPC.AI_107_ImprovedWalkers(), Terraria.NPC.AI_109_DarkMage(), Terraria.NPC.AI_121_QueenSlime(), Terraria.Projectile.AI_130_FlameBurstTower_FindTarget(), Terraria.Projectile.AI_134_Ballista_FindTarget(), Terraria.Projectile.AI_137_CanHit(), Terraria.NPC.BloodNautilus_CallForHelp(), Terraria.Player.CanHit(), Terraria.Projectile.CanHitWithMeleeWeapon(), Terraria.Projectile.CanHitWithOwnBody(), Terraria.Mount.CastSuperCartLaser(), Terraria.GameContent.UI.EmoteBubble.CheckForNPCsToReactToEmoteBubble(), Terraria.Projectile.Colliding(), Terraria.Projectile.Damage(), Terraria.Projectile.FindTargetWithinRange(), Terraria.Player.GetFarthestSpawnPositionOnLine(), Terraria.WorldGen.GrowMoreVines(), Terraria.Projectile.HandleMovement(), Terraria.NPC.HitEffect(), Terraria.Player.ItemCheck_Shoot(), Terraria.Projectile.Kill(), Terraria.Player.QuickMinecart(), Terraria.Player.QuickMinecartSnap(), Terraria.Player.SpawnHallucination(), Terraria.GameInput.LockOnHelper.Update(), and Terraria.Mount.UpdateEffects().