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

◆ Collision_DecideFallThroughPlatforms()

bool Terraria.NPC.Collision_DecideFallThroughPlatforms ( )
inlineprivate

Definition at line 89645 of file NPC.cs.

89646 {
89647 bool result = false;
89648 if (type == 2 || type == -43 || type == 190 || type == 191 || type == 192 || type == 193 || type == 194 || type == 317 || type == 318 || type == 133)
89649 {
89650 result = true;
89651 }
89652 if (aiStyle == 10)
89653 {
89654 result = true;
89655 }
89656 if (aiStyle == 5)
89657 {
89658 result = true;
89659 }
89660 if (aiStyle == 40)
89661 {
89662 result = true;
89663 }
89664 if (aiStyle == 44)
89665 {
89666 result = true;
89667 }
89668 if (type == 467)
89669 {
89670 result = true;
89671 }
89672 if (type == 477)
89673 {
89674 result = true;
89675 }
89676 if (aiStyle == 22)
89677 {
89678 result = true;
89679 }
89680 if (aiStyle == 49)
89681 {
89682 result = true;
89683 }
89684 if (aiStyle == 14)
89685 {
89686 result = true;
89687 }
89688 if (type == 173)
89689 {
89690 result = true;
89691 }
89692 if (type == 469 && ai[2] == 1f)
89693 {
89694 result = true;
89695 }
89696 if (aiStyle == 3 && directionY == 1)
89697 {
89698 result = true;
89699 }
89700 if (type == 210 || type == 211)
89701 {
89702 result = true;
89703 }
89704 if (type == 50 && target >= 0 && Main.player[target].position.Y > position.Y + (float)height)
89705 {
89706 result = true;
89707 }
89708 if (type == 657 && target >= 0 && Main.player[target].position.Y > base.Bottom.Y)
89709 {
89710 result = true;
89711 }
89712 if (aiStyle == 26 && target >= 0 && Main.player[target].Bottom.Y - velocity.Y > base.Bottom.Y)
89713 {
89714 result = true;
89715 }
89716 if (type == 247 || type == 248)
89717 {
89718 result = true;
89719 }
89720 if (type == 245 && target >= 0 && Main.player[target].position.Y > position.Y + (float)height)
89721 {
89722 result = true;
89723 }
89724 if (type >= 542 && type <= 545)
89725 {
89726 result = true;
89727 }
89728 if (aiStyle == 107 && directionY == 1)
89729 {
89730 result = true;
89731 }
89732 if (type == 418)
89733 {
89734 result = true;
89735 }
89736 if (aiStyle == 87 && Main.player[target].position.Y > position.Y + (float)height)
89737 {
89738 result = true;
89739 }
89740 if (type == 405 || type == 406)
89741 {
89742 result = true;
89743 }
89744 if (type == 490)
89745 {
89746 result = true;
89747 }
89748 if (type == 301)
89749 {
89750 result = true;
89751 }
89752 if (aiStyle == 7)
89753 {
89754 int num = 16;
89755 bool flag = false;
89756 if (townNPC && (!Main.dayTime || Main.invasionType > 0 || Main.eclipse))
89757 {
89758 flag = true;
89759 }
89760 else
89761 {
89762 int num2 = (int)(position.Y + (float)height) / 16;
89763 if (homeTileY - num2 > num)
89764 {
89765 result = true;
89766 }
89767 }
89768 if (flag && (position.Y + (float)height - 8f) / 16f < (float)(homeTileY - 1))
89769 {
89770 result = true;
89771 }
89772 }
89773 if (type == 620)
89774 {
89775 result = ((target >= 0 && Main.player[target].position.Y > base.Bottom.Y) ? true : false);
89776 }
89777 return result;
89778 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
int aiStyle
Definition NPC.cs:453
float[] ai
Definition NPC.cs:447
int type
Definition NPC.cs:445
int directionY
Definition NPC.cs:443
int target
Definition NPC.cs:459
bool townNPC
Definition NPC.cs:537
int homeTileY
Definition NPC.cs:545

References Terraria.Main.dayTime, Terraria.Main.eclipse, Terraria.Main.invasionType, Terraria.Main.player, and System.type.