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

◆ Update()

void Terraria.Player.Update ( int i)
inline

Definition at line 22642 of file Player.cs.

22643 {
22644 //IL_00af: Unknown result type (might be due to invalid IL or missing references)
22645 //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
22646 //IL_6c9c: Unknown result type (might be due to invalid IL or missing references)
22647 //IL_6a5a: Unknown result type (might be due to invalid IL or missing references)
22648 //IL_6df4: Unknown result type (might be due to invalid IL or missing references)
22649 //IL_6e52: Unknown result type (might be due to invalid IL or missing references)
22650 //IL_7927: Unknown result type (might be due to invalid IL or missing references)
22651 //IL_7946: Unknown result type (might be due to invalid IL or missing references)
22652 //IL_794c: Unknown result type (might be due to invalid IL or missing references)
22653 //IL_755b: Unknown result type (might be due to invalid IL or missing references)
22654 //IL_757d: Unknown result type (might be due to invalid IL or missing references)
22655 //IL_7583: Unknown result type (might be due to invalid IL or missing references)
22656 //IL_73a1: Unknown result type (might be due to invalid IL or missing references)
22657 //IL_73c0: Unknown result type (might be due to invalid IL or missing references)
22658 //IL_73c6: Unknown result type (might be due to invalid IL or missing references)
22659 //IL_0657: Unknown result type (might be due to invalid IL or missing references)
22660 //IL_067b: Unknown result type (might be due to invalid IL or missing references)
22661 //IL_0681: Unknown result type (might be due to invalid IL or missing references)
22662 //IL_06ad: Unknown result type (might be due to invalid IL or missing references)
22663 //IL_06b7: Unknown result type (might be due to invalid IL or missing references)
22664 //IL_06bc: Unknown result type (might be due to invalid IL or missing references)
22665 //IL_7819: Unknown result type (might be due to invalid IL or missing references)
22666 //IL_783b: Unknown result type (might be due to invalid IL or missing references)
22667 //IL_7841: Unknown result type (might be due to invalid IL or missing references)
22668 //IL_7711: Unknown result type (might be due to invalid IL or missing references)
22669 //IL_7733: Unknown result type (might be due to invalid IL or missing references)
22670 //IL_7739: Unknown result type (might be due to invalid IL or missing references)
22671 //IL_7620: Unknown result type (might be due to invalid IL or missing references)
22672 //IL_7625: Unknown result type (might be due to invalid IL or missing references)
22673 //IL_7643: Unknown result type (might be due to invalid IL or missing references)
22674 //IL_7648: Unknown result type (might be due to invalid IL or missing references)
22675 //IL_7666: Unknown result type (might be due to invalid IL or missing references)
22676 //IL_766b: Unknown result type (might be due to invalid IL or missing references)
22677 //IL_6fcf: Unknown result type (might be due to invalid IL or missing references)
22678 //IL_6ff1: Unknown result type (might be due to invalid IL or missing references)
22679 //IL_6ff7: Unknown result type (might be due to invalid IL or missing references)
22680 //IL_7689: Unknown result type (might be due to invalid IL or missing references)
22681 //IL_768e: Unknown result type (might be due to invalid IL or missing references)
22682 //IL_7293: Unknown result type (might be due to invalid IL or missing references)
22683 //IL_72b5: Unknown result type (might be due to invalid IL or missing references)
22684 //IL_72bb: Unknown result type (might be due to invalid IL or missing references)
22685 //IL_7185: Unknown result type (might be due to invalid IL or missing references)
22686 //IL_71a7: Unknown result type (might be due to invalid IL or missing references)
22687 //IL_71ad: Unknown result type (might be due to invalid IL or missing references)
22688 //IL_7094: Unknown result type (might be due to invalid IL or missing references)
22689 //IL_7099: Unknown result type (might be due to invalid IL or missing references)
22690 //IL_70b7: Unknown result type (might be due to invalid IL or missing references)
22691 //IL_70bc: Unknown result type (might be due to invalid IL or missing references)
22692 //IL_70da: Unknown result type (might be due to invalid IL or missing references)
22693 //IL_70df: Unknown result type (might be due to invalid IL or missing references)
22694 //IL_70fd: Unknown result type (might be due to invalid IL or missing references)
22695 //IL_7102: Unknown result type (might be due to invalid IL or missing references)
22696 //IL_7e19: Unknown result type (might be due to invalid IL or missing references)
22697 //IL_7e1e: Unknown result type (might be due to invalid IL or missing references)
22698 //IL_7e65: Unknown result type (might be due to invalid IL or missing references)
22699 //IL_7e6a: Unknown result type (might be due to invalid IL or missing references)
22700 //IL_8208: Unknown result type (might be due to invalid IL or missing references)
22701 //IL_820d: Unknown result type (might be due to invalid IL or missing references)
22702 //IL_822f: Unknown result type (might be due to invalid IL or missing references)
22703 //IL_7fad: Unknown result type (might be due to invalid IL or missing references)
22704 //IL_7fb4: Unknown result type (might be due to invalid IL or missing references)
22705 //IL_7fb9: Unknown result type (might be due to invalid IL or missing references)
22706 //IL_7fca: Unknown result type (might be due to invalid IL or missing references)
22707 //IL_7fcf: Unknown result type (might be due to invalid IL or missing references)
22708 //IL_8274: Unknown result type (might be due to invalid IL or missing references)
22709 //IL_827a: Unknown result type (might be due to invalid IL or missing references)
22710 //IL_827f: Unknown result type (might be due to invalid IL or missing references)
22711 //IL_8284: Unknown result type (might be due to invalid IL or missing references)
22712 //IL_8032: Unknown result type (might be due to invalid IL or missing references)
22713 //IL_8038: Unknown result type (might be due to invalid IL or missing references)
22714 //IL_803d: Unknown result type (might be due to invalid IL or missing references)
22715 //IL_8080: Unknown result type (might be due to invalid IL or missing references)
22716 //IL_8085: Unknown result type (might be due to invalid IL or missing references)
22717 //IL_8151: Unknown result type (might be due to invalid IL or missing references)
22718 //IL_8158: Unknown result type (might be due to invalid IL or missing references)
22719 //IL_815d: Unknown result type (might be due to invalid IL or missing references)
22720 //IL_80a8: Unknown result type (might be due to invalid IL or missing references)
22721 //IL_1987: Unknown result type (might be due to invalid IL or missing references)
22722 //IL_2e1a: Unknown result type (might be due to invalid IL or missing references)
22723 //IL_2e28: Unknown result type (might be due to invalid IL or missing references)
22724 //IL_2e2d: Unknown result type (might be due to invalid IL or missing references)
22725 //IL_2e35: Unknown result type (might be due to invalid IL or missing references)
22726 //IL_2e3a: Unknown result type (might be due to invalid IL or missing references)
22727 //IL_2e41: Unknown result type (might be due to invalid IL or missing references)
22728 //IL_2e46: Unknown result type (might be due to invalid IL or missing references)
22729 //IL_2e5f: Unknown result type (might be due to invalid IL or missing references)
22730 //IL_2e65: Unknown result type (might be due to invalid IL or missing references)
22731 //IL_2e7b: Unknown result type (might be due to invalid IL or missing references)
22732 //IL_2e80: Unknown result type (might be due to invalid IL or missing references)
22733 //IL_2e90: Unknown result type (might be due to invalid IL or missing references)
22734 //IL_2e95: Unknown result type (might be due to invalid IL or missing references)
22735 //IL_2e9a: Unknown result type (might be due to invalid IL or missing references)
22736 //IL_2ea0: Unknown result type (might be due to invalid IL or missing references)
22737 //IL_2ead: Unknown result type (might be due to invalid IL or missing references)
22738 //IL_2eb3: Unknown result type (might be due to invalid IL or missing references)
22739 //IL_2eb5: Unknown result type (might be due to invalid IL or missing references)
22740 //IL_2ebf: Unknown result type (might be due to invalid IL or missing references)
22741 //IL_2ec4: Unknown result type (might be due to invalid IL or missing references)
22742 //IL_1767: Unknown result type (might be due to invalid IL or missing references)
22743 //IL_1786: Unknown result type (might be due to invalid IL or missing references)
22744 //IL_178c: Unknown result type (might be due to invalid IL or missing references)
22745 //IL_2ef9: Unknown result type (might be due to invalid IL or missing references)
22746 //IL_2f07: Unknown result type (might be due to invalid IL or missing references)
22747 //IL_2f0c: Unknown result type (might be due to invalid IL or missing references)
22748 //IL_2f14: Unknown result type (might be due to invalid IL or missing references)
22749 //IL_2f19: Unknown result type (might be due to invalid IL or missing references)
22750 //IL_2f20: Unknown result type (might be due to invalid IL or missing references)
22751 //IL_2f25: Unknown result type (might be due to invalid IL or missing references)
22752 //IL_2f3e: Unknown result type (might be due to invalid IL or missing references)
22753 //IL_2f44: Unknown result type (might be due to invalid IL or missing references)
22754 //IL_2f5a: Unknown result type (might be due to invalid IL or missing references)
22755 //IL_2f5f: Unknown result type (might be due to invalid IL or missing references)
22756 //IL_2f66: Unknown result type (might be due to invalid IL or missing references)
22757 //IL_2f6b: Unknown result type (might be due to invalid IL or missing references)
22758 //IL_2f70: Unknown result type (might be due to invalid IL or missing references)
22759 //IL_2f76: Unknown result type (might be due to invalid IL or missing references)
22760 //IL_2f83: Unknown result type (might be due to invalid IL or missing references)
22761 //IL_2f89: Unknown result type (might be due to invalid IL or missing references)
22762 //IL_2f8b: Unknown result type (might be due to invalid IL or missing references)
22763 //IL_2f95: Unknown result type (might be due to invalid IL or missing references)
22764 //IL_2f9a: Unknown result type (might be due to invalid IL or missing references)
22765 //IL_849f: Unknown result type (might be due to invalid IL or missing references)
22766 //IL_8489: Unknown result type (might be due to invalid IL or missing references)
22767 //IL_843b: Unknown result type (might be due to invalid IL or missing references)
22768 //IL_3159: Unknown result type (might be due to invalid IL or missing references)
22769 //IL_84b3: Unknown result type (might be due to invalid IL or missing references)
22770 //IL_84ca: Unknown result type (might be due to invalid IL or missing references)
22771 //IL_8139: Unknown result type (might be due to invalid IL or missing references)
22772 //IL_83a5: Unknown result type (might be due to invalid IL or missing references)
22773 //IL_83aa: Unknown result type (might be due to invalid IL or missing references)
22774 //IL_83cc: Unknown result type (might be due to invalid IL or missing references)
22775 //IL_8343: Unknown result type (might be due to invalid IL or missing references)
22776 //IL_8348: Unknown result type (might be due to invalid IL or missing references)
22777 //IL_836a: Unknown result type (might be due to invalid IL or missing references)
22778 //IL_8582: Unknown result type (might be due to invalid IL or missing references)
22779 //IL_8594: Unknown result type (might be due to invalid IL or missing references)
22780 //IL_1377: Unknown result type (might be due to invalid IL or missing references)
22781 //IL_137c: Unknown result type (might be due to invalid IL or missing references)
22782 //IL_1380: Unknown result type (might be due to invalid IL or missing references)
22783 //IL_1385: Unknown result type (might be due to invalid IL or missing references)
22784 //IL_14d7: Unknown result type (might be due to invalid IL or missing references)
22785 //IL_14dc: Unknown result type (might be due to invalid IL or missing references)
22786 //IL_14e0: Unknown result type (might be due to invalid IL or missing references)
22787 //IL_14e5: Unknown result type (might be due to invalid IL or missing references)
22788 //IL_39ec: Unknown result type (might be due to invalid IL or missing references)
22789 //IL_39fc: Unknown result type (might be due to invalid IL or missing references)
22790 //IL_359b: Unknown result type (might be due to invalid IL or missing references)
22791 //IL_35f4: Unknown result type (might be due to invalid IL or missing references)
22792 //IL_3b74: Unknown result type (might be due to invalid IL or missing references)
22793 //IL_64b2: Unknown result type (might be due to invalid IL or missing references)
22794 //IL_64cd: Unknown result type (might be due to invalid IL or missing references)
22795 //IL_64da: Unknown result type (might be due to invalid IL or missing references)
22796 //IL_64df: Unknown result type (might be due to invalid IL or missing references)
22797 //IL_64e1: Unknown result type (might be due to invalid IL or missing references)
22798 //IL_64ed: Unknown result type (might be due to invalid IL or missing references)
22799 //IL_3d76: Unknown result type (might be due to invalid IL or missing references)
22800 //IL_3ba8: Unknown result type (might be due to invalid IL or missing references)
22801 //IL_3dc3: Unknown result type (might be due to invalid IL or missing references)
22802 //IL_3c44: Unknown result type (might be due to invalid IL or missing references)
22803 //IL_3e5f: Unknown result type (might be due to invalid IL or missing references)
22804 //IL_66cb: Unknown result type (might be due to invalid IL or missing references)
22805 //IL_67de: Unknown result type (might be due to invalid IL or missing references)
22806 //IL_67e3: Unknown result type (might be due to invalid IL or missing references)
22807 //IL_67e7: Unknown result type (might be due to invalid IL or missing references)
22808 //IL_37af: Unknown result type (might be due to invalid IL or missing references)
22809 //IL_460a: Unknown result type (might be due to invalid IL or missing references)
22810 //IL_4782: Unknown result type (might be due to invalid IL or missing references)
22811 //IL_473c: Unknown result type (might be due to invalid IL or missing references)
22812 //IL_483c: Unknown result type (might be due to invalid IL or missing references)
22813 //IL_47f9: Unknown result type (might be due to invalid IL or missing references)
22814 //IL_4c56: Unknown result type (might be due to invalid IL or missing references)
22815 //IL_4dae: Unknown result type (might be due to invalid IL or missing references)
22816 //IL_4dea: Unknown result type (might be due to invalid IL or missing references)
22817 //IL_533d: Unknown result type (might be due to invalid IL or missing references)
22818 //IL_5356: Unknown result type (might be due to invalid IL or missing references)
22819 //IL_535c: Unknown result type (might be due to invalid IL or missing references)
22820 //IL_53a1: Unknown result type (might be due to invalid IL or missing references)
22821 //IL_53ab: Unknown result type (might be due to invalid IL or missing references)
22822 //IL_53b0: Unknown result type (might be due to invalid IL or missing references)
22823 //IL_543f: Unknown result type (might be due to invalid IL or missing references)
22824 //IL_545b: Unknown result type (might be due to invalid IL or missing references)
22825 //IL_5461: Unknown result type (might be due to invalid IL or missing references)
22826 //IL_54b5: Unknown result type (might be due to invalid IL or missing references)
22827 //IL_54bf: Unknown result type (might be due to invalid IL or missing references)
22828 //IL_54c4: Unknown result type (might be due to invalid IL or missing references)
22829 //IL_556a: Unknown result type (might be due to invalid IL or missing references)
22830 //IL_5585: Unknown result type (might be due to invalid IL or missing references)
22831 //IL_558b: Unknown result type (might be due to invalid IL or missing references)
22832 //IL_55b0: Unknown result type (might be due to invalid IL or missing references)
22833 //IL_55ba: Unknown result type (might be due to invalid IL or missing references)
22834 //IL_55bf: Unknown result type (might be due to invalid IL or missing references)
22835 //IL_5652: Unknown result type (might be due to invalid IL or missing references)
22836 //IL_566a: Unknown result type (might be due to invalid IL or missing references)
22837 //IL_5670: Unknown result type (might be due to invalid IL or missing references)
22838 //IL_5695: Unknown result type (might be due to invalid IL or missing references)
22839 //IL_569f: Unknown result type (might be due to invalid IL or missing references)
22840 //IL_56a4: Unknown result type (might be due to invalid IL or missing references)
22841 //IL_5757: Unknown result type (might be due to invalid IL or missing references)
22842 //IL_5773: Unknown result type (might be due to invalid IL or missing references)
22843 //IL_5779: Unknown result type (might be due to invalid IL or missing references)
22844 //IL_579f: Unknown result type (might be due to invalid IL or missing references)
22845 //IL_57a9: Unknown result type (might be due to invalid IL or missing references)
22846 //IL_57ae: Unknown result type (might be due to invalid IL or missing references)
22847 //IL_5826: Unknown result type (might be due to invalid IL or missing references)
22848 //IL_5846: Unknown result type (might be due to invalid IL or missing references)
22849 //IL_584c: Unknown result type (might be due to invalid IL or missing references)
22850 //IL_5863: Unknown result type (might be due to invalid IL or missing references)
22851 //IL_586d: Unknown result type (might be due to invalid IL or missing references)
22852 //IL_5872: Unknown result type (might be due to invalid IL or missing references)
22853 //IL_58d4: Unknown result type (might be due to invalid IL or missing references)
22854 //IL_59b8: Unknown result type (might be due to invalid IL or missing references)
22855 //IL_59cf: Unknown result type (might be due to invalid IL or missing references)
22856 //IL_59d5: Unknown result type (might be due to invalid IL or missing references)
22857 //IL_5dc6: Unknown result type (might be due to invalid IL or missing references)
22858 //IL_5dcb: Unknown result type (might be due to invalid IL or missing references)
22859 //IL_5dda: Unknown result type (might be due to invalid IL or missing references)
22860 //IL_5ddf: Unknown result type (might be due to invalid IL or missing references)
22861 //IL_5bf5: Unknown result type (might be due to invalid IL or missing references)
22862 //IL_5c15: Unknown result type (might be due to invalid IL or missing references)
22863 //IL_5c1b: Unknown result type (might be due to invalid IL or missing references)
22864 //IL_5c4e: Unknown result type (might be due to invalid IL or missing references)
22865 //IL_5c58: Unknown result type (might be due to invalid IL or missing references)
22866 //IL_5c5d: Unknown result type (might be due to invalid IL or missing references)
22867 //IL_5c6b: Unknown result type (might be due to invalid IL or missing references)
22868 //IL_5c71: Unknown result type (might be due to invalid IL or missing references)
22869 //IL_5c76: Unknown result type (might be due to invalid IL or missing references)
22870 //IL_5c7b: Unknown result type (might be due to invalid IL or missing references)
22871 //IL_5e15: Unknown result type (might be due to invalid IL or missing references)
22872 //IL_5e4b: Unknown result type (might be due to invalid IL or missing references)
22873 //IL_5e51: Unknown result type (might be due to invalid IL or missing references)
22874 //IL_5e84: Unknown result type (might be due to invalid IL or missing references)
22875 //IL_5e8e: Unknown result type (might be due to invalid IL or missing references)
22876 //IL_5e93: Unknown result type (might be due to invalid IL or missing references)
22877 //IL_5ea1: Unknown result type (might be due to invalid IL or missing references)
22878 //IL_5ea7: Unknown result type (might be due to invalid IL or missing references)
22879 //IL_5eac: Unknown result type (might be due to invalid IL or missing references)
22880 //IL_5eb1: Unknown result type (might be due to invalid IL or missing references)
22881 //IL_5eed: Unknown result type (might be due to invalid IL or missing references)
22882 //IL_5eef: Unknown result type (might be due to invalid IL or missing references)
22883 //IL_5d02: Unknown result type (might be due to invalid IL or missing references)
22884 //IL_5d24: Unknown result type (might be due to invalid IL or missing references)
22885 //IL_5d2a: Unknown result type (might be due to invalid IL or missing references)
22886 //IL_5d5d: Unknown result type (might be due to invalid IL or missing references)
22887 //IL_5d67: Unknown result type (might be due to invalid IL or missing references)
22888 //IL_5d6c: Unknown result type (might be due to invalid IL or missing references)
22889 //IL_5d7a: Unknown result type (might be due to invalid IL or missing references)
22890 //IL_5d80: Unknown result type (might be due to invalid IL or missing references)
22891 //IL_5d85: Unknown result type (might be due to invalid IL or missing references)
22892 //IL_5d8a: Unknown result type (might be due to invalid IL or missing references)
22893 //IL_5f58: Unknown result type (might be due to invalid IL or missing references)
22894 //IL_5f93: Unknown result type (might be due to invalid IL or missing references)
22895 //IL_5f99: Unknown result type (might be due to invalid IL or missing references)
22896 //IL_5fcc: Unknown result type (might be due to invalid IL or missing references)
22897 //IL_5fd6: Unknown result type (might be due to invalid IL or missing references)
22898 //IL_5fdb: Unknown result type (might be due to invalid IL or missing references)
22899 //IL_5fe9: Unknown result type (might be due to invalid IL or missing references)
22900 //IL_5fef: Unknown result type (might be due to invalid IL or missing references)
22901 //IL_5ff4: Unknown result type (might be due to invalid IL or missing references)
22902 //IL_5ff9: Unknown result type (might be due to invalid IL or missing references)
22903 //IL_6035: Unknown result type (might be due to invalid IL or missing references)
22904 //IL_6037: Unknown result type (might be due to invalid IL or missing references)
22905 using (new Main.CurrentPlayerOverride(this))
22906 {
22907 if (i == Main.myPlayer && Main.netMode != 2)
22908 {
22910 }
22911 if (i == Main.myPlayer && Main.dontStarveWorld)
22912 {
22914 }
22915 maxFallSpeed = 10f;
22917 jumpHeight = 15;
22918 jumpSpeed = 5.01f;
22919 maxRunSpeed = 3f;
22920 runAcceleration = 0.08f;
22921 runSlowdown = 0.2f;
22923 if (!mount.Active || !mount.Cart)
22924 {
22925 onWrongGround = false;
22926 }
22927 heldProj = -1;
22930 {
22931 maxFallSpeed = 35f;
22932 }
22933 if (shimmerWet || shimmering)
22934 {
22935 if (shimmering)
22936 {
22937 gravity *= 0.9f;
22938 maxFallSpeed *= 0.9f;
22939 }
22940 else
22941 {
22942 gravity = 0.15f;
22943 jumpHeight = 23;
22944 jumpSpeed = 5.51f;
22945 }
22946 }
22947 else if (wet)
22948 {
22949 if (honeyWet)
22950 {
22951 gravity = 0.1f;
22952 maxFallSpeed = 3f;
22953 }
22954 else if (merman)
22955 {
22956 gravity = 0.3f;
22957 maxFallSpeed = 7f;
22958 }
22959 else if (trident && !lavaWet)
22960 {
22961 gravity = 0.25f;
22962 maxFallSpeed = 6f;
22963 jumpHeight = 25;
22964 jumpSpeed = 5.51f;
22965 if (controlUp)
22966 {
22967 gravity = 0.1f;
22968 maxFallSpeed = 2f;
22969 }
22970 }
22971 else
22972 {
22973 gravity = 0.2f;
22974 maxFallSpeed = 5f;
22975 jumpHeight = 30;
22976 jumpSpeed = 6.01f;
22977 }
22978 }
22979 if (vortexDebuff)
22980 {
22981 gravity = 0f;
22982 }
22983 maxFallSpeed += 0.01f;
22984 bool flag = false;
22985 if (Main.myPlayer == i)
22986 {
22987 if (Main.mapFullscreen)
22988 {
22990 }
22991 else if (_quickGrappleCooldown > 0)
22992 {
22994 }
22995 TileObject.objectPreview.Reset();
22997 {
22999 }
23000 autoReuseAllWeapons = Main.SettingsEnabled_AutoReuseAllItems;
23001 }
23002 if (NPC.freeCake && talkNPC >= 0 && Main.npc[talkNPC].type == 208)
23003 {
23004 NPC.freeCake = false;
23005 if (Main.netMode != 1)
23006 {
23007 Item.NewItem(new EntitySource_Gift(Main.npc[talkNPC]), (int)position.X, (int)position.Y, width, height, 3750);
23008 }
23009 }
23010 if (emoteTime > 0)
23011 {
23012 emoteTime--;
23013 }
23014 if (ghostDmg > 0f)
23015 {
23016 ghostDmg -= 6.6666665f;
23017 }
23018 if (ghostDmg < 0f)
23019 {
23020 ghostDmg = 0f;
23021 }
23022 if (Main.expertMode)
23023 {
23024 if (lifeSteal < 70f)
23025 {
23026 lifeSteal += 0.5f;
23027 }
23028 if (lifeSteal > 70f)
23029 {
23030 lifeSteal = 70f;
23031 }
23032 }
23033 else
23034 {
23035 if (lifeSteal < 80f)
23036 {
23037 lifeSteal += 0.6f;
23038 }
23039 if (lifeSteal > 80f)
23040 {
23041 lifeSteal = 80f;
23042 }
23043 }
23044 ResizeHitbox();
23045 if (mount.Active && mount.Type == 0)
23046 {
23047 int num111 = (int)(position.X + (float)(width / 2)) / 16;
23048 int j = (int)(position.Y + (float)(height / 2) - 14f) / 16;
23049 Lighting.AddLight(num111, j, 0.5f, 0.2f, 0.05f);
23050 Lighting.AddLight(num111 + direction, j, 0.5f, 0.2f, 0.05f);
23051 Lighting.AddLight(num111 + direction * 2, j, 0.5f, 0.2f, 0.05f);
23052 }
23053 outOfRange = false;
23054 if (whoAmI != Main.myPlayer)
23055 {
23056 int num27 = (int)(position.X + (float)(width / 2)) / 16;
23057 int num37 = (int)(position.Y + (float)(height / 2)) / 16;
23058 if (Main.netMode == 1 && !Main.sectionManager.TilesLoaded(num27 - 3, num37 - 3, num27 + 3, num37 + 3))
23059 {
23060 flag = true;
23061 }
23062 if (flag)
23063 {
23064 outOfRange = true;
23065 numMinions = 0;
23066 slotsMinions = 0f;
23067 itemAnimation = 0;
23068 UpdateBuffs(i);
23069 PlayerFrame();
23070 }
23071 }
23072 if (tankPet >= 0)
23073 {
23074 if (!tankPetReset)
23075 {
23076 tankPetReset = true;
23077 }
23078 else
23079 {
23080 tankPet = -1;
23081 }
23082 }
23083 if (i == Main.myPlayer)
23084 {
23086 }
23087 if (chatOverhead.timeLeft > 0)
23088 {
23090 }
23092 {
23094 }
23096 if (flag)
23097 {
23098 return;
23099 }
23102 PlayerLoader.PreUpdate(this);
23104 if (infernoCounter >= 180)
23105 {
23106 infernoCounter = 0;
23107 }
23109 if (timeSinceLastDashStarted >= 300)
23110 {
23112 }
23115 {
23117 }
23118 if (titaniumStormCooldown > 0)
23119 {
23121 }
23122 if (starCloakCooldown > 0)
23123 {
23125 if (Main.rand.Next(5) == 0)
23126 {
23127 for (int k = 0; k < 2; k++)
23128 {
23129 Dust dust = Dust.NewDustDirect(position, width, height, 45, 0f, 0f, 255, default(Color), (float)Main.rand.Next(20, 26) * 0.1f);
23130 dust.noLight = true;
23131 dust.noGravity = true;
23132 dust.velocity *= 0.5f;
23133 dust.velocity.X = 0f;
23134 dust.velocity.Y -= 0.5f;
23135 }
23136 }
23137 if (starCloakCooldown == 0)
23138 {
23140 }
23141 }
23143 if (_timeSinceLastImmuneGet >= 10000)
23144 {
23146 }
23147 float num47 = (float)Main.maxTilesX / 4200f;
23148 num47 *= num47;
23149 float num58 = (float)((double)(position.Y / 16f - (60f + 10f * num47)) / (Main.worldSurface / 6.0));
23150 if (Main.remixWorld)
23151 {
23152 num58 = (float)((double)(position.Y / 16f - (60f + 10f * num47)) / (Main.worldSurface / 1.0));
23153 }
23154 if (Main.remixWorld)
23155 {
23156 if ((double)num58 < 0.1)
23157 {
23158 num58 = 0.1f;
23159 }
23160 }
23161 else if ((double)num58 < 0.25)
23162 {
23163 num58 = 0.25f;
23164 }
23165 if (num58 > 1f)
23166 {
23167 num58 = 1f;
23168 }
23169 gravity *= num58;
23170 maxRegenDelay = (1f - (float)statMana / (float)statManaMax2) * 60f * 4f + 45f;
23171 maxRegenDelay *= 0.7f;
23174 whoAmI = i;
23175 if (whoAmI == Main.myPlayer)
23176 {
23177 if (!DD2Event.Ongoing)
23178 {
23180 }
23182 if (whoAmI == Main.myPlayer)
23183 {
23184 doorHelper.Update(this);
23185 }
23186 }
23187 if (runSoundDelay > 0)
23188 {
23189 runSoundDelay--;
23190 }
23191 if (attackCD > 0)
23192 {
23193 attackCD--;
23194 }
23195 if (itemAnimation == 0)
23196 {
23197 attackCD = 0;
23198 }
23199 if (potionDelay > 0)
23200 {
23201 potionDelay--;
23202 }
23203 if (i == Main.myPlayer)
23204 {
23205 if (trashItem.type >= 1522 && trashItem.type <= 1527)
23206 {
23208 }
23209 if (trashItem.type == 3643)
23210 {
23212 }
23213 UpdateBiomes();
23215 }
23216 if (ghost)
23217 {
23218 Ghost();
23219 return;
23220 }
23221 if (dead)
23222 {
23223 UpdateDead();
23226 return;
23227 }
23229 if (i == Main.myPlayer && hasLucyTheAxe)
23230 {
23232 }
23233 if (velocity.Y == 0f)
23234 {
23236 }
23237 Rectangle val;
23238 if (i == Main.myPlayer && !isControlledByFilm)
23239 {
23240 ResetControls();
23241 if (Main.hasFocus)
23242 {
23243 if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput)
23244 {
23245 PlayerInput.Triggers.Current.CopyInto(this);
23246 LocalInputCache = new DirectionalInputSyncCache(this);
23247 if (Main.mapFullscreen)
23248 {
23249 if (controlUp)
23250 {
23251 Main.mapFullscreenPos.Y -= 1f * (16f / Main.mapFullscreenScale);
23252 }
23253 if (controlDown)
23254 {
23255 Main.mapFullscreenPos.Y += 1f * (16f / Main.mapFullscreenScale);
23256 }
23257 if (controlLeft)
23258 {
23259 Main.mapFullscreenPos.X -= 1f * (16f / Main.mapFullscreenScale);
23260 }
23261 if (controlRight)
23262 {
23263 Main.mapFullscreenPos.X += 1f * (16f / Main.mapFullscreenScale);
23264 }
23265 controlUp = false;
23266 controlLeft = false;
23267 controlDown = false;
23268 controlRight = false;
23269 controlJump = false;
23270 controlUseItem = false;
23271 controlUseTile = false;
23272 controlThrow = false;
23273 controlHook = false;
23274 controlTorch = false;
23275 controlSmart = false;
23276 controlMount = false;
23277 }
23279 {
23281 }
23282 if (controlQuickHeal)
23283 {
23284 if (releaseQuickHeal)
23285 {
23286 QuickHeal();
23287 }
23288 releaseQuickHeal = false;
23289 }
23290 else
23291 {
23292 releaseQuickHeal = true;
23293 }
23294 if (controlQuickMana)
23295 {
23296 if (releaseQuickMana)
23297 {
23298 QuickMana();
23299 }
23300 releaseQuickMana = false;
23301 }
23302 else
23303 {
23304 releaseQuickMana = true;
23305 }
23307 {
23309 {
23311 }
23312 releaseCreativeMenu = false;
23313 }
23314 else
23315 {
23316 releaseCreativeMenu = true;
23317 }
23319 {
23320 controlLeft = false;
23321 controlRight = false;
23322 }
23324 {
23326 {
23327 TryToToggleSmartCursor(ref Main.SmartCursorWanted_Mouse);
23328 }
23329 else if (PlayerInput.UsingGamepad)
23330 {
23331 TryToToggleSmartCursor(ref Main.SmartCursorWanted_GamePad);
23332 }
23333 else
23334 {
23335 TryToToggleSmartCursor(ref Main.SmartCursorWanted_Mouse);
23336 }
23337 }
23338 if (controlSmart)
23339 {
23340 releaseSmart = false;
23341 }
23342 else
23343 {
23344 releaseSmart = true;
23345 }
23346 if (controlMount)
23347 {
23348 if (releaseMount)
23349 {
23350 QuickMount();
23351 }
23352 releaseMount = false;
23353 }
23354 else
23355 {
23356 releaseMount = true;
23357 }
23358 if (Main.mapFullscreen)
23359 {
23360 if (mapZoomIn)
23361 {
23362 Main.mapFullscreenScale *= 1.05f;
23363 }
23364 if (mapZoomOut)
23365 {
23366 Main.mapFullscreenScale *= 0.95f;
23367 }
23368 }
23369 else
23370 {
23371 if (Main.mapStyle == 1)
23372 {
23373 if (mapZoomIn)
23374 {
23375 Main.mapMinimapScale *= 1.025f;
23376 }
23377 if (mapZoomOut)
23378 {
23379 Main.mapMinimapScale *= 0.975f;
23380 }
23381 if (mapAlphaUp)
23382 {
23383 Main.mapMinimapAlpha += 0.015f;
23384 }
23385 if (mapAlphaDown)
23386 {
23387 Main.mapMinimapAlpha -= 0.015f;
23388 }
23389 }
23390 else if (Main.mapStyle == 2)
23391 {
23392 if (mapZoomIn)
23393 {
23394 Main.mapOverlayScale *= 1.05f;
23395 }
23396 if (mapZoomOut)
23397 {
23398 Main.mapOverlayScale *= 0.95f;
23399 }
23400 if (mapAlphaUp)
23401 {
23402 Main.mapOverlayAlpha += 0.015f;
23403 }
23404 if (mapAlphaDown)
23405 {
23406 Main.mapOverlayAlpha -= 0.015f;
23407 }
23408 }
23409 if (mapStyle)
23410 {
23411 if (releaseMapStyle)
23412 {
23414 Main.mapStyle++;
23415 if (Main.mapStyle > 2)
23416 {
23417 Main.mapStyle = 0;
23418 }
23419 }
23420 releaseMapStyle = false;
23421 }
23422 else
23423 {
23424 releaseMapStyle = true;
23425 }
23426 }
23427 if (mapFullScreen)
23428 {
23430 {
23431 if (Main.mapFullscreen)
23432 {
23434 Main.mapFullscreen = false;
23435 }
23436 else
23437 {
23439 }
23440 }
23441 releaseMapFullscreen = false;
23442 }
23443 else
23444 {
23445 releaseMapFullscreen = true;
23446 }
23447 }
23448 else if (!PlayerInput.UsingGamepad && !Main.editSign && !Main.editChest && !Main.blockInput)
23449 {
23450 PlayerInput.Triggers.Current.CopyIntoDuringChat(this);
23451 }
23452 if (confused)
23453 {
23454 bool flag12 = controlLeft;
23455 bool flag23 = controlUp;
23460 }
23461 else if (cartFlip)
23462 {
23464 {
23465 bool flag25 = controlLeft;
23468 }
23469 else
23470 {
23471 cartFlip = false;
23472 }
23473 }
23474 for (int l = 0; l < doubleTapCardinalTimer.Length; l++)
23475 {
23477 if (doubleTapCardinalTimer[l] < 0)
23478 {
23480 }
23481 }
23482 for (int m = 0; m < 4; m++)
23483 {
23484 bool flag26 = false;
23485 bool flag27 = false;
23486 switch (m)
23487 {
23488 case 0:
23491 break;
23492 case 1:
23494 flag27 = controlUp;
23495 break;
23496 case 2:
23499 break;
23500 case 3:
23503 break;
23504 }
23505 if (flag26)
23506 {
23507 if (doubleTapCardinalTimer[m] > 0)
23508 {
23509 KeyDoubleTap(m);
23510 }
23511 else
23512 {
23514 }
23515 }
23516 if (flag27)
23517 {
23520 }
23521 else
23522 {
23524 }
23525 }
23528 if (controlInv)
23529 {
23530 if (releaseInventory)
23531 {
23532 ToggleInv();
23533 }
23534 releaseInventory = false;
23535 }
23536 else
23537 {
23538 releaseInventory = true;
23539 }
23540 if (delayUseItem)
23541 {
23542 if (!controlUseItem)
23543 {
23544 delayUseItem = false;
23545 }
23546 controlUseItem = false;
23547 }
23548 if (itemAnimation == 0 && ItemTimeIsZero && reuseDelay == 0)
23549 {
23550 dropItemCheck();
23551 int num69 = selectedItem;
23552 bool flag28 = false;
23553 if (!Main.drawingPlayerChat && selectedItem != 58 && !Main.editSign && !Main.editChest)
23554 {
23555 if (PlayerInput.Triggers.Current.Hotbar1)
23556 {
23557 selectedItem = 0;
23558 flag28 = true;
23559 }
23560 if (PlayerInput.Triggers.Current.Hotbar2)
23561 {
23562 selectedItem = 1;
23563 flag28 = true;
23564 }
23565 if (PlayerInput.Triggers.Current.Hotbar3)
23566 {
23567 selectedItem = 2;
23568 flag28 = true;
23569 }
23570 if (PlayerInput.Triggers.Current.Hotbar4)
23571 {
23572 selectedItem = 3;
23573 flag28 = true;
23574 }
23575 if (PlayerInput.Triggers.Current.Hotbar5)
23576 {
23577 selectedItem = 4;
23578 flag28 = true;
23579 }
23580 if (PlayerInput.Triggers.Current.Hotbar6)
23581 {
23582 selectedItem = 5;
23583 flag28 = true;
23584 }
23585 if (PlayerInput.Triggers.Current.Hotbar7)
23586 {
23587 selectedItem = 6;
23588 flag28 = true;
23589 }
23590 if (PlayerInput.Triggers.Current.Hotbar8)
23591 {
23592 selectedItem = 7;
23593 flag28 = true;
23594 }
23595 if (PlayerInput.Triggers.Current.Hotbar9)
23596 {
23597 selectedItem = 8;
23598 flag28 = true;
23599 }
23600 if (PlayerInput.Triggers.Current.Hotbar10)
23601 {
23602 selectedItem = 9;
23603 flag28 = true;
23604 }
23612 {
23614 }
23616 {
23618 }
23620 {
23622 {
23623 case 0:
23624 QuickMount();
23625 break;
23626 case 1:
23627 QuickHeal();
23628 break;
23629 case 2:
23630 QuickBuff();
23631 break;
23632 case 3:
23633 QuickMana();
23634 break;
23635 }
23636 }
23637 if (controlTorch || flag28)
23638 {
23641 }
23642 if (nonTorch != -1 && flag28)
23643 {
23644 if (selectedItem != nonTorch)
23645 {
23647 }
23650 flag28 = false;
23651 }
23652 }
23653 bool flag29 = Main.hairWindow;
23654 if (flag29)
23655 {
23656 int y = Main.screenHeight / 2 + 60;
23657 val = new Rectangle(Main.screenWidth / 2 - TextureAssets.HairStyleBack.Width() / 2, y, TextureAssets.HairStyleBack.Width(), TextureAssets.HairStyleBack.Height());
23658 flag29 = ((Rectangle)(ref val)).Contains(Main.MouseScreen.ToPoint());
23659 }
23660 if (flag28 && CaptureManager.Instance.Active)
23661 {
23662 CaptureManager.Instance.Active = false;
23663 }
23664 if (num69 != selectedItem)
23665 {
23667 }
23668 if (Main.mapFullscreen)
23669 {
23670 float num80 = PlayerInput.ScrollWheelDelta / 120;
23672 {
23673 num80 += (float)(PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt()) * 0.1f;
23674 }
23675 Main.mapFullscreenScale *= 1f + num80 * 0.3f;
23676 }
23677 else if (CaptureManager.Instance.Active)
23678 {
23679 CaptureManager.Instance.Scrolling();
23680 }
23681 else if (!flag29)
23682 {
23683 if (PlayerInput.MouseInModdedUI.Count <= 0)
23684 {
23685 if (!Main.playerInventory)
23686 {
23687 HandleHotbar();
23688 }
23689 else
23690 {
23691 int num90 = GetMouseScrollDelta();
23692 bool flag30 = true;
23693 if (Main.recBigList)
23694 {
23695 int num100 = 42;
23696 int num10 = 340;
23697 int num19 = 310;
23699 int num20 = (Main.screenWidth - num19 - 280) / num100;
23700 int num21 = (Main.screenHeight - num10 - 20) / num100;
23701 val = new Rectangle(num19, num10, num20 * num100, num21 * num100);
23702 if (((Rectangle)(ref val)).Contains(Main.MouseScreen.ToPoint()))
23703 {
23704 num90 *= -1;
23705 int num22 = Math.Sign(num90);
23706 while (num90 != 0)
23707 {
23708 if (num90 < 0)
23709 {
23710 Main.recStart -= num20;
23711 if (Main.recStart < 0)
23712 {
23713 Main.recStart = 0;
23714 }
23715 }
23716 else
23717 {
23718 Main.recStart += num20;
23719 if (Main.recStart > Main.numAvailableRecipes - num20)
23720 {
23721 Main.recStart = Main.numAvailableRecipes - num20;
23722 }
23723 }
23724 num90 -= num22;
23725 }
23726 }
23728 }
23729 if (flag30)
23730 {
23731 Main.focusRecipe += num90;
23732 if (Main.focusRecipe > Main.numAvailableRecipes - 1)
23733 {
23734 Main.focusRecipe = Main.numAvailableRecipes - 1;
23735 }
23736 if (Main.focusRecipe < 0)
23737 {
23738 Main.focusRecipe = 0;
23739 }
23740 }
23741 }
23742 }
23744 }
23745 }
23746 else
23747 {
23748 bool flag2 = false;
23749 if (!Main.drawingPlayerChat && selectedItem != 58 && !Main.editSign && !Main.editChest)
23750 {
23751 int num23 = -1;
23752 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)49))
23753 {
23754 num23 = 0;
23755 flag2 = true;
23756 }
23757 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)50))
23758 {
23759 num23 = 1;
23760 flag2 = true;
23761 }
23762 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)51))
23763 {
23764 num23 = 2;
23765 flag2 = true;
23766 }
23767 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)52))
23768 {
23769 num23 = 3;
23770 flag2 = true;
23771 }
23772 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)53))
23773 {
23774 num23 = 4;
23775 flag2 = true;
23776 }
23777 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)54))
23778 {
23779 num23 = 5;
23780 flag2 = true;
23781 }
23782 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)55))
23783 {
23784 num23 = 6;
23785 flag2 = true;
23786 }
23787 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)56))
23788 {
23789 num23 = 7;
23790 flag2 = true;
23791 }
23792 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)57))
23793 {
23794 num23 = 8;
23795 flag2 = true;
23796 }
23797 if (((KeyboardState)(ref Main.keyState)).IsKeyDown((Keys)48))
23798 {
23799 num23 = 9;
23800 flag2 = true;
23801 }
23802 if (flag2)
23803 {
23804 if (num23 != nonTorch)
23805 {
23807 }
23808 selectItemOnNextUse = true;
23809 nonTorch = num23;
23810 }
23811 }
23812 }
23813 }
23814 if (stoned != lastStoned)
23815 {
23816 if (whoAmI == Main.myPlayer && stoned)
23817 {
23818 int damage = (int)(20.0 * (double)Main.GameModeInfo.EnemyDamageMultiplier);
23819 Hurt(PlayerDeathReason.ByOther(5), damage, 0);
23820 }
23821 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
23822 for (int n = 0; n < 20; n++)
23823 {
23824 int num24 = Dust.NewDust(position, width, height, 1);
23825 if (Main.rand.Next(2) == 0)
23826 {
23827 Main.dust[num24].noGravity = true;
23828 }
23829 }
23830 }
23832 if (frozen || webbed || stoned)
23833 {
23834 controlJump = false;
23835 controlDown = false;
23836 controlLeft = false;
23837 controlRight = false;
23838 controlUp = false;
23839 controlUseItem = false;
23840 controlUseTile = false;
23841 controlThrow = false;
23842 gravDir = 1f;
23843 }
23844 if (!controlThrow)
23845 {
23846 releaseThrow = true;
23847 }
23848 else
23849 {
23850 releaseThrow = false;
23851 }
23852 if (controlDown && releaseDown)
23853 {
23855 {
23856 tryKeepingHoveringUp = false;
23857 }
23858 else
23859 {
23861 }
23862 }
23863 if (controlUp && releaseUp)
23864 {
23866 {
23867 tryKeepingHoveringDown = false;
23868 }
23869 else
23870 {
23871 tryKeepingHoveringUp = true;
23872 }
23873 }
23874 if (velocity.Y == 0f)
23875 {
23876 tryKeepingHoveringUp = false;
23877 tryKeepingHoveringDown = false;
23878 }
23879 if (Settings.HoverControl == Settings.HoverControlMode.Hold)
23880 {
23881 tryKeepingHoveringUp = false;
23882 tryKeepingHoveringDown = false;
23883 }
23885 if (Main.playerInventory)
23886 {
23887 AdjTiles();
23888 }
23891 }
23892 if (i == Main.myPlayer)
23893 {
23894 if (velocity.Y <= 0f)
23895 {
23896 fallStart2 = (int)(position.Y / 16f);
23897 }
23898 if (velocity.Y == 0f)
23899 {
23900 int num25 = 25;
23901 num25 += extraFall;
23902 int num26 = (int)(position.Y / 16f) - fallStart;
23903 if (mount.CanFly())
23904 {
23905 num26 = 0;
23906 }
23907 if (mount.Cart && Minecart.OnTrack(position, width, height))
23908 {
23909 num26 = 0;
23910 }
23911 if (mount.Type == 1)
23912 {
23913 num26 = 0;
23914 }
23915 if (num26 > 0 || (gravDir == -1f && num26 < 0))
23916 {
23917 int num112 = (int)(position.X / 16f);
23918 int num28 = (int)((position.X + (float)width) / 16f);
23919 int num29 = (int)((position.Y + (float)height + 1f) / 16f);
23920 if (gravDir == -1f)
23921 {
23922 num29 = (int)((position.Y - 1f) / 16f);
23923 }
23924 for (int num30 = num112; num30 <= num28; num30++)
23925 {
23926 if (Main.tile[num30, num29] != null && Main.tile[num30, num29].active() && (Main.tile[num30, num29].type == 189 || Main.tile[num30, num29].type == 196 || Main.tile[num30, num29].type == 460 || Main.tile[num30, num29].type == 666))
23927 {
23928 num26 = 0;
23929 break;
23930 }
23931 }
23932 }
23933 bool flag3 = equippedWings != null;
23934 if (stoned)
23935 {
23936 int num31 = (int)(((float)num26 * gravDir - 2f) * 20f);
23937 if (num31 > 0)
23938 {
23940 immune = false;
23941 }
23942 }
23943 else if (((gravDir == 1f && num26 > num25) || (gravDir == -1f && num26 < -num25)) && !noFallDmg && !flag3)
23944 {
23945 immune = false;
23946 int num32 = (int)((float)num26 * gravDir - (float)num25) * 10;
23947 if (mount.Active)
23948 {
23949 num32 = (int)((float)num32 * mount.FallDamage);
23950 }
23952 if (!dead && statLife <= statLifeMax2 / 10)
23953 {
23955 }
23956 }
23957 fallStart = (int)(position.Y / 16f);
23958 }
23959 if (jump > 0 || rocketDelay > 0 || wet || slowFall || (double)num58 < 0.8 || tongued)
23960 {
23961 fallStart = (int)(position.Y / 16f);
23962 }
23963 }
23964 if (Main.netMode != 1)
23965 {
23966 if (chest == -1 && lastChest >= 0 && Main.chest[lastChest] != null)
23967 {
23968 int x6 = Main.chest[lastChest].x;
23969 int y2 = Main.chest[lastChest].y;
23970 NPC.BigMimicSummonCheck(x6, y2, this);
23971 }
23972 if (lastChest != chest && chest >= 0 && Main.chest[chest] != null)
23973 {
23974 int x7 = Main.chest[chest].x;
23975 int y3 = Main.chest[chest].y;
23976 Projectile.GasTrapCheck(x7, y3, this);
23977 ItemSlot.forceClearGlowsOnChest = true;
23978 }
23979 lastChest = chest;
23980 }
23981 if (mouseInterface)
23982 {
23983 delayUseItem = true;
23984 }
23985 tileTargetX = (int)(((float)Main.mouseX + Main.screenPosition.X) / 16f);
23986 tileTargetY = (int)(((float)Main.mouseY + Main.screenPosition.Y) / 16f);
23987 if (gravDir == -1f)
23988 {
23989 tileTargetY = (int)((Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY) / 16f);
23990 }
23991 if (tileTargetX >= Main.maxTilesX - 5)
23992 {
23993 tileTargetX = Main.maxTilesX - 5;
23994 }
23995 if (tileTargetY >= Main.maxTilesY - 5)
23996 {
23997 tileTargetY = Main.maxTilesY - 5;
23998 }
23999 if (tileTargetX < 5)
24000 {
24001 tileTargetX = 5;
24002 }
24003 if (tileTargetY < 5)
24004 {
24005 tileTargetY = 5;
24006 }
24007 if (Main.tile[tileTargetX - 1, tileTargetY] == null)
24008 {
24009 Main.tile[tileTargetX - 1, tileTargetY] = default(Tile);
24010 }
24011 if (Main.tile[tileTargetX + 1, tileTargetY] == null)
24012 {
24013 Main.tile[tileTargetX + 1, tileTargetY] = default(Tile);
24014 }
24015 if (Main.tile[tileTargetX, tileTargetY] == null)
24016 {
24017 Main.tile[tileTargetX, tileTargetY] = default(Tile);
24018 }
24020 {
24021 if (Main.tile[tileTargetX - 1, tileTargetY].active() && Main.tile[tileTargetX - 1, tileTargetY].type == 323)
24022 {
24023 if (Main.tile[tileTargetX - 1, tileTargetY].frameY > 4)
24024 {
24025 tileTargetX--;
24026 }
24027 }
24028 else if (Main.tile[tileTargetX + 1, tileTargetY].active() && Main.tile[tileTargetX + 1, tileTargetY].type == 323 && Main.tile[tileTargetX + 1, tileTargetY].frameY < -4)
24029 {
24030 tileTargetX++;
24031 }
24032 }
24033 if (i == Main.myPlayer)
24034 {
24036 }
24037 try
24038 {
24039 if (whoAmI == Main.myPlayer && ((Game)Main.instance).IsActive)
24040 {
24043 }
24044 }
24045 catch
24046 {
24047 Main.SmartCursorWanted_GamePad = false;
24048 Main.SmartCursorWanted_Mouse = false;
24049 }
24051 if (petalTimer > 0)
24052 {
24053 petalTimer--;
24054 }
24055 if (shadowDodgeTimer > 0)
24056 {
24058 }
24059 if (boneGloveTimer > 0)
24060 {
24062 }
24063 if (crystalLeafCooldown > 0)
24064 {
24066 }
24067 if (jump > 0 || velocity.Y != 0f)
24068 {
24070 }
24071 bool flag4 = pStone;
24072 potionDelayTime = Item.potionDelay;
24073 restorationDelayTime = Item.restorationDelay;
24074 mushroomDelayTime = Item.mushroomDelay;
24075 if (pStone)
24076 {
24080 }
24081 if (yoraiz0rEye > 0)
24082 {
24083 Yoraiz0rEye();
24084 }
24085 ResetEffects();
24086 UpdateDyes();
24088 {
24089 creativeGodMode = true;
24090 }
24092 {
24093 afkCounter++;
24094 }
24095 else
24096 {
24097 afkCounter = 0;
24098 }
24099 if (whoAmI == Main.myPlayer)
24100 {
24101 Main.musicBox2 = -1;
24102 if (Main.SceneMetrics.WaterCandleCount > 0)
24103 {
24104 AddBuff(86, 2, quiet: false);
24105 }
24106 if (Main.SceneMetrics.PeaceCandleCount > 0)
24107 {
24108 AddBuff(157, 2, quiet: false);
24109 }
24110 if (Main.SceneMetrics.ShadowCandleCount > 0)
24111 {
24112 AddBuff(350, 2, quiet: false);
24113 }
24114 if (Main.SceneMetrics.HasCampfire)
24115 {
24116 AddBuff(87, 2, quiet: false);
24117 }
24118 if (Main.SceneMetrics.HasCatBast)
24119 {
24120 AddBuff(215, 2, quiet: false);
24121 }
24122 if (Main.SceneMetrics.HasStarInBottle)
24123 {
24124 AddBuff(158, 2, quiet: false);
24125 }
24126 if (Main.SceneMetrics.HasHeartLantern)
24127 {
24128 AddBuff(89, 2, quiet: false);
24129 }
24130 if (Main.SceneMetrics.HasSunflower)
24131 {
24132 AddBuff(146, 2, quiet: false);
24133 }
24134 if (Main.SceneMetrics.hasBanner)
24135 {
24136 AddBuff(147, 2, quiet: false);
24137 }
24139 {
24140 AddBuff(194, 2, quiet: false);
24141 }
24142 }
24144 for (int num33 = 0; num33 < BuffLoader.BuffCount; num33++)
24145 {
24146 buffImmune[num33] = false;
24147 }
24149 UpdateBuffs(i);
24151 if (kbBuff)
24152 {
24153 allKB *= 1.5f;
24154 }
24155 if (whoAmI == Main.myPlayer)
24156 {
24157 if (!onFire && !poisoned)
24158 {
24159 trapDebuffSource = false;
24160 }
24161 UpdatePet(i);
24162 UpdatePetLight(i);
24164 }
24165 bool flag5 = wet && !lavaWet && (!mount.Active || !mount.IsConsideredASlimeMount);
24166 if (accMerman && flag5)
24167 {
24168 releaseJump = true;
24169 wings = 0;
24170 merman = true;
24171 accFlipper = true;
24172 AddBuff(34, 2);
24173 }
24174 else
24175 {
24176 merman = false;
24177 }
24178 if (!flag5 && forceWerewolf)
24179 {
24180 forceMerman = false;
24181 }
24182 if (forceMerman && flag5)
24183 {
24184 wings = 0;
24185 }
24186 accMerman = false;
24187 hideMerman = false;
24188 forceMerman = false;
24189 if (wolfAcc && !merman && !Main.dayTime && !wereWolf)
24190 {
24191 AddBuff(28, 60);
24192 }
24193 wolfAcc = false;
24194 hideWolf = false;
24195 forceWerewolf = false;
24196 if (whoAmI == Main.myPlayer)
24197 {
24198 for (int num34 = 0; num34 < maxBuffs; num34++)
24199 {
24200 if (buffType[num34] > 0 && buffTime[num34] <= 0)
24201 {
24202 DelBuff(num34);
24203 }
24204 }
24205 }
24206 beetleDefense = false;
24207 beetleOffense = false;
24208 setSolar = false;
24209 head = armor[0].headSlot;
24210 body = armor[1].bodySlot;
24211 legs = armor[2].legSlot;
24214 {
24216 }
24217 if (_portalPhysicsTime > 0)
24218 {
24220 }
24221 UpdateEquips(i);
24222 if (Main.npcShop <= 0)
24223 {
24225 }
24226 if (flag4 != pStone)
24227 {
24229 }
24231 UpdateLuck();
24234 if (velocity.Y == 0f || controlJump)
24235 {
24236 portalPhysicsFlag = false;
24237 }
24238 if (inventory[selectedItem].type == 3384 || portalPhysicsFlag)
24239 {
24240 _portalPhysicsTime = 30;
24241 }
24242 if (mount.Active)
24243 {
24244 mount.UpdateEffects(this);
24245 }
24246 gemCount++;
24247 if (gemCount >= 10)
24248 {
24249 gem = -1;
24250 ownedLargeGems = (byte)0;
24251 gemCount = 0;
24252 for (int num35 = 0; num35 <= 58; num35++)
24253 {
24254 if (inventory[num35].type == 0 || inventory[num35].stack == 0)
24255 {
24257 }
24258 if (inventory[num35].type >= 1522 && inventory[num35].type <= 1527)
24259 {
24260 gem = inventory[num35].type - 1522;
24261 ownedLargeGems[gem] = true;
24262 }
24263 if (inventory[num35].type == 3643)
24264 {
24265 gem = 6;
24266 ownedLargeGems[gem] = true;
24267 }
24268 }
24269 }
24271 UpdateArmorSets(i);
24272 if (shadowDodge && !onHitDodge)
24273 {
24274 ClearBuff(59);
24275 }
24278 {
24281 }
24282 if (shieldRaised)
24283 {
24284 statDefense += 20;
24285 }
24286 if ((merman || forceMerman) && flag5)
24287 {
24288 wings = 0;
24289 }
24290 if (invis)
24291 {
24292 if (itemAnimation == 0 && aggro > -750)
24293 {
24294 aggro = -750;
24295 }
24296 else if (aggro > -250)
24297 {
24298 aggro = -250;
24299 }
24300 }
24301 if (inventory[selectedItem].type == 3106)
24302 {
24303 if (itemAnimation > 0)
24304 {
24305 stealthTimer = 15;
24306 if (stealth > 0f)
24307 {
24308 stealth += 0.1f;
24309 }
24310 }
24311 else if ((double)velocity.X > -0.1 && (double)velocity.X < 0.1 && (double)velocity.Y > -0.1 && (double)velocity.Y < 0.1 && !mount.Active)
24312 {
24313 if (stealthTimer == 0 && stealth > 0f)
24314 {
24315 stealth -= 0.02f;
24316 if ((double)stealth <= 0.0)
24317 {
24318 stealth = 0f;
24319 if (Main.netMode == 1)
24320 {
24321 NetMessage.SendData(84, -1, -1, null, whoAmI);
24322 }
24323 }
24324 }
24325 }
24326 else
24327 {
24328 if (stealth > 0f)
24329 {
24330 stealth += 0.1f;
24331 }
24332 if (mount.Active)
24333 {
24334 stealth = 1f;
24335 }
24336 }
24337 if (stealth > 1f)
24338 {
24339 stealth = 1f;
24340 }
24341 meleeDamage += (1f - stealth) * 3f;
24342 meleeCrit += (int)((1f - stealth) * 30f);
24344 aggro -= (int)((1f - stealth) * 750f);
24345 if (stealthTimer > 0)
24346 {
24347 stealthTimer--;
24348 }
24349 }
24350 else if (shroomiteStealth)
24351 {
24352 if (itemAnimation > 0)
24353 {
24354 stealthTimer = 5;
24355 }
24356 if ((double)velocity.X > -0.1 && (double)velocity.X < 0.1 && (double)velocity.Y > -0.1 && (double)velocity.Y < 0.1 && !mount.Active)
24357 {
24358 if (stealthTimer == 0 && stealth > 0f)
24359 {
24360 stealth -= 0.015f;
24361 if ((double)stealth <= 0.0)
24362 {
24363 stealth = 0f;
24364 if (Main.netMode == 1)
24365 {
24366 NetMessage.SendData(84, -1, -1, null, whoAmI);
24367 }
24368 }
24369 }
24370 }
24371 else
24372 {
24373 float num36 = Math.Abs(velocity.X) + Math.Abs(velocity.Y);
24374 stealth += num36 * 0.0075f;
24375 if (stealth > 1f)
24376 {
24377 stealth = 1f;
24378 }
24379 if (mount.Active)
24380 {
24381 stealth = 1f;
24382 }
24383 }
24384 rangedDamage += (1f - stealth) * 0.6f;
24385 rangedCrit += (int)((1f - stealth) * 10f);
24386 GetKnockback(DamageClass.Ranged) *= 1f + (1f - stealth) * 0.5f;
24387 aggro -= (int)((1f - stealth) * 750f);
24388 if (stealthTimer > 0)
24389 {
24390 stealthTimer--;
24391 }
24392 }
24393 else if (setVortex)
24394 {
24395 bool flag6 = false;
24397 {
24398 float num38 = stealth;
24399 stealth -= 0.04f;
24400 if (stealth < 0f)
24401 {
24402 stealth = 0f;
24403 }
24404 else
24405 {
24406 flag6 = true;
24407 }
24408 if (stealth == 0f && num38 != stealth && Main.netMode == 1)
24409 {
24410 NetMessage.SendData(84, -1, -1, null, whoAmI);
24411 }
24412 rangedDamage += (1f - stealth) * 0.8f;
24413 rangedCrit += (int)((1f - stealth) * 20f);
24414 GetKnockback(DamageClass.Ranged) *= 1f + (1f - stealth) * 0.5f;
24415 aggro -= (int)((1f - stealth) * 1200f);
24416 accRunSpeed *= 0.3f;
24417 maxRunSpeed *= 0.3f;
24418 if (mount.Active)
24419 {
24420 vortexStealthActive = false;
24421 }
24422 }
24423 else
24424 {
24425 float num39 = stealth;
24426 stealth += 0.04f;
24427 if (stealth > 1f)
24428 {
24429 stealth = 1f;
24430 }
24431 else
24432 {
24433 flag6 = true;
24434 }
24435 if (stealth == 1f && num39 != stealth && Main.netMode == 1)
24436 {
24437 NetMessage.SendData(84, -1, -1, null, whoAmI);
24438 }
24439 }
24440 if (flag6)
24441 {
24442 if (Main.rand.Next(2) == 0)
24443 {
24444 Vector2 vector = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
24445 Dust obj2 = Main.dust[Dust.NewDust(base.Center - vector * 30f, 0, 0, 229)];
24446 obj2.noGravity = true;
24447 obj2.position = base.Center - vector * (float)Main.rand.Next(5, 11);
24448 obj2.velocity = vector.RotatedBy(1.5707963705062866) * 4f;
24449 obj2.scale = 0.5f + Main.rand.NextFloat();
24450 obj2.fadeIn = 0.5f;
24451 }
24452 if (Main.rand.Next(2) == 0)
24453 {
24454 Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
24455 Dust obj3 = Main.dust[Dust.NewDust(base.Center - vector2 * 30f, 0, 0, 240)];
24456 obj3.noGravity = true;
24457 obj3.position = base.Center - vector2 * 12f;
24458 obj3.velocity = vector2.RotatedBy(-1.5707963705062866) * 2f;
24459 obj3.scale = 0.5f + Main.rand.NextFloat();
24460 obj3.fadeIn = 0.5f;
24461 }
24462 }
24463 }
24464 else
24465 {
24466 stealth = 1f;
24467 }
24468 if (manaSick)
24469 {
24471 }
24472 if (tileSpeed > 3f)
24473 {
24474 tileSpeed = 3f;
24475 }
24476 tileSpeed = 1f / tileSpeed;
24477 if (wallSpeed > 3f)
24478 {
24479 wallSpeed = 3f;
24480 }
24481 wallSpeed = 1f / wallSpeed;
24482 if (slowOgreSpit)
24483 {
24484 moveSpeed /= 3f;
24485 if (velocity.Y == 0f && Math.Abs(velocity.X) > 1f)
24486 {
24487 velocity.X /= 2f;
24488 }
24489 }
24490 else if (dazed)
24491 {
24492 moveSpeed /= 3f;
24493 }
24494 else if (slow)
24495 {
24496 moveSpeed /= 2f;
24497 }
24498 else if (chilled)
24499 {
24500 moveSpeed *= 0.75f;
24501 }
24502 if (shieldRaised)
24503 {
24504 moveSpeed /= 3f;
24505 if (velocity.Y == 0f && Math.Abs(velocity.X) > 3f)
24506 {
24507 velocity.X /= 2f;
24508 }
24509 }
24510 if (DD2Event.Ongoing)
24511 {
24513 if (DD2Event.ShouldBlockBuilding(base.Center))
24514 {
24515 noBuilding = true;
24516 AddBuff(199, 3);
24517 }
24518 }
24519 if ((double)pickSpeed < 0.3)
24520 {
24521 pickSpeed = 0.3f;
24522 }
24526 soulDrain = 0;
24528 if (manaRegenCount < 0)
24529 {
24530 manaRegenCount = 0;
24531 }
24532 if (statMana > statManaMax2)
24533 {
24535 }
24539 for (int num40 = 0; num40 < maxBuffs; num40++)
24540 {
24541 if (buffType[num40] > 0 && buffTime[num40] > 0 && buffImmune[buffType[num40]])
24542 {
24543 DelBuff(num40);
24544 }
24545 }
24546 if (brokenArmor)
24547 {
24548 statDefense /= 2f;
24549 }
24550 if (witheredArmor)
24551 {
24552 statDefense /= 2f;
24553 }
24554 if (witheredWeapon)
24555 {
24556 allDamage *= 0.5f;
24557 }
24560 if (mount.Active)
24561 {
24563 }
24564 else
24565 {
24567 }
24569 {
24571 }
24572 else if (velocity.Y == 0f || sliding)
24573 {
24575 }
24576 else
24577 {
24579 }
24580 if (!carpet)
24581 {
24582 canCarpet = false;
24583 carpetFrame = -1;
24584 }
24585 else if (velocity.Y == 0f || sliding)
24586 {
24587 canCarpet = true;
24588 carpetTime = 0;
24589 carpetFrame = -1;
24591 }
24592 if (gravDir == -1f)
24593 {
24594 canCarpet = false;
24595 }
24596 if (ropeCount > 0)
24597 {
24598 ropeCount--;
24599 }
24600 if (!pulley && !frozen && !webbed && !stoned && !controlJump && gravDir == 1f && ropeCount == 0 && grappling[0] == -1 && !tongued && !mount.Active)
24601 {
24602 FindPulley();
24603 }
24605 sitting.UpdateSitting(this);
24606 sleeping.UpdateState(this);
24607 eyeHelper.Update(this);
24608 if (pulley)
24609 {
24610 if (mount.Active)
24611 {
24612 pulley = false;
24613 }
24614 sandStorm = false;
24616 int num41 = (int)(position.X + (float)(width / 2)) / 16;
24617 int num42 = (int)(position.Y - 8f) / 16;
24618 bool flag7 = false;
24619 if (pulleyDir == 0)
24620 {
24621 pulleyDir = 1;
24622 }
24623 if (pulleyDir == 1)
24624 {
24625 if (direction == -1 && controlLeft && (releaseLeft || leftTimer == 0))
24626 {
24627 pulleyDir = 2;
24628 flag7 = true;
24629 }
24630 else if ((direction == 1 && controlRight && releaseRight) || rightTimer == 0)
24631 {
24632 pulleyDir = 2;
24633 flag7 = true;
24634 }
24635 else
24636 {
24637 if (direction == 1 && controlLeft)
24638 {
24639 direction = -1;
24640 flag7 = true;
24641 }
24642 if (direction == -1 && controlRight)
24643 {
24644 direction = 1;
24645 flag7 = true;
24646 }
24647 }
24648 }
24649 else if (pulleyDir == 2)
24650 {
24651 if (direction == 1 && controlLeft)
24652 {
24653 flag7 = true;
24654 if (!Collision.SolidCollision(new Vector2((float)(num41 * 16 + 8 - width / 2), position.Y), width, height))
24655 {
24656 pulleyDir = 1;
24657 direction = -1;
24658 flag7 = true;
24659 }
24660 }
24661 if (direction == -1 && controlRight)
24662 {
24663 flag7 = true;
24664 if (!Collision.SolidCollision(new Vector2((float)(num41 * 16 + 8 - width / 2), position.Y), width, height))
24665 {
24666 pulleyDir = 1;
24667 direction = 1;
24668 flag7 = true;
24669 }
24670 }
24671 }
24672 int num43 = 1;
24673 if (controlLeft)
24674 {
24675 num43 = -1;
24676 }
24678 if (controlLeft && direction == -1 && flag8)
24679 {
24680 instantMovementAccumulatedThisFrame.X += -1f;
24681 }
24682 if (controlRight && direction == 1 && flag8)
24683 {
24684 instantMovementAccumulatedThisFrame.X += 1f;
24685 }
24686 bool flag9 = false;
24687 if (!flag7 && ((controlLeft && (releaseLeft || leftTimer == 0)) || (controlRight && (releaseRight || rightTimer == 0))))
24688 {
24689 int num44 = num41 + num43;
24690 if (WorldGen.IsRope(num44, num42))
24691 {
24692 pulleyDir = 1;
24693 direction = num43;
24694 int num45 = num44 * 16 + 8 - width / 2;
24695 float y4 = position.Y;
24696 y4 = num42 * 16 + 22;
24697 if (Main.tile[num44, num42 - 1] == null)
24698 {
24699 Main.tile[num44, num42 - 1] = default(Tile);
24700 }
24701 if (Main.tile[num44, num42 + 1] == null)
24702 {
24703 Main.tile[num44, num42 + 1] = default(Tile);
24704 }
24705 if (WorldGen.IsRope(num44, num42 - 1) || WorldGen.IsRope(num44, num42 + 1))
24706 {
24707 y4 = num42 * 16 + 22;
24708 }
24709 if (Collision.SolidCollision(new Vector2((float)num45, y4), width, height))
24710 {
24711 pulleyDir = 2;
24712 direction = -num43;
24713 num45 = ((direction != 1) ? (num44 * 16 + 8 - width / 2 + -6) : (num44 * 16 + 8 - width / 2 + 6));
24714 }
24715 if (i == Main.myPlayer)
24716 {
24717 Main.cameraX = Main.cameraX + position.X - (float)num45;
24718 }
24719 position.X = num45;
24720 gfxOffY = position.Y - y4;
24721 position.Y = y4;
24722 flag9 = true;
24723 }
24724 }
24725 if (!flag9 && !flag7 && !controlUp && ((controlLeft && releaseLeft) || (controlRight && releaseRight)))
24726 {
24727 pulley = false;
24728 if (controlLeft && velocity.X == 0f)
24729 {
24730 velocity.X = -1f;
24731 }
24732 if (controlRight && velocity.X == 0f)
24733 {
24734 velocity.X = 1f;
24735 }
24736 }
24737 if (velocity.X != 0f)
24738 {
24739 pulley = false;
24740 }
24741 if (Main.tile[num41, num42] == null)
24742 {
24743 Main.tile[num41, num42] = default(Tile);
24744 }
24745 if (!WorldGen.IsRope(num41, num42))
24746 {
24747 pulley = false;
24748 }
24749 if (gravDir != 1f)
24750 {
24751 pulley = false;
24752 }
24753 if (frozen || webbed || stoned)
24754 {
24755 pulley = false;
24756 }
24757 if (!pulley)
24758 {
24759 velocity.Y -= gravity;
24760 }
24761 if (controlJump)
24762 {
24763 pulley = false;
24764 jump = jumpHeight;
24765 velocity.Y = 0f - jumpSpeed;
24766 }
24767 }
24768 if (grapCount > 0)
24769 {
24770 pulley = false;
24771 }
24772 if (NPC.brainOfGravity >= 0 && NPC.brainOfGravity < 200 && Vector2.Distance(base.Center, Main.npc[NPC.brainOfGravity].Center) < 4000f)
24773 {
24774 forcedGravity = 10;
24775 }
24776 if (forcedGravity > 0)
24777 {
24778 gravDir = -1f;
24779 }
24780 if (pulley)
24781 {
24782 fallStart = (int)position.Y / 16;
24783 wingFrame = 0;
24784 if (wings == 4)
24785 {
24786 wingFrame = 3;
24787 }
24788 int num46 = (int)(position.X + (float)(width / 2)) / 16;
24789 int num48 = (int)(position.Y - 16f) / 16;
24790 int num49 = (int)(position.Y - 8f) / 16;
24791 bool flag10 = true;
24792 bool flag11 = false;
24793 if (WorldGen.IsRope(num46, num49 - 1) || WorldGen.IsRope(num46, num49 + 1))
24794 {
24795 flag11 = true;
24796 }
24797 if (Main.tile[num46, num48] == null)
24798 {
24799 Main.tile[num46, num48] = default(Tile);
24800 }
24801 if (!WorldGen.IsRope(num46, num48))
24802 {
24803 flag10 = false;
24804 if (velocity.Y < 0f)
24805 {
24806 velocity.Y = 0f;
24807 }
24808 }
24809 if (flag11)
24810 {
24811 if (controlUp && flag10)
24812 {
24813 float x3 = position.X;
24814 float y5 = position.Y - Math.Abs(velocity.Y) - 2f;
24815 if (Collision.SolidCollision(new Vector2(x3, y5), width, height))
24816 {
24817 x3 = num46 * 16 + 8 - width / 2 + 6;
24818 if (!Collision.SolidCollision(new Vector2(x3, y5), width, (int)((float)height + Math.Abs(velocity.Y) + 2f)))
24819 {
24820 if (i == Main.myPlayer)
24821 {
24822 Main.cameraX = Main.cameraX + position.X - x3;
24823 }
24824 pulleyDir = 2;
24825 direction = 1;
24826 position.X = x3;
24827 velocity.X = 0f;
24828 }
24829 else
24830 {
24831 x3 = num46 * 16 + 8 - width / 2 + -6;
24832 if (!Collision.SolidCollision(new Vector2(x3, y5), width, (int)((float)height + Math.Abs(velocity.Y) + 2f)))
24833 {
24834 if (i == Main.myPlayer)
24835 {
24836 Main.cameraX = Main.cameraX + position.X - x3;
24837 }
24838 pulleyDir = 2;
24839 direction = -1;
24840 position.X = x3;
24841 velocity.X = 0f;
24842 }
24843 }
24844 }
24845 if (velocity.Y > 0f)
24846 {
24847 velocity.Y *= 0.7f;
24848 }
24849 if (velocity.Y > -3f)
24850 {
24851 velocity.Y -= 0.2f;
24852 }
24853 else
24854 {
24855 velocity.Y -= 0.02f;
24856 }
24857 if (velocity.Y < -8f)
24858 {
24859 velocity.Y = -8f;
24860 }
24861 }
24862 else if (controlDown)
24863 {
24864 float x4 = position.X;
24865 float y6 = position.Y;
24866 if (Collision.SolidCollision(new Vector2(x4, y6), width, (int)((float)height + Math.Abs(velocity.Y) + 2f)))
24867 {
24868 x4 = num46 * 16 + 8 - width / 2 + 6;
24869 if (!Collision.SolidCollision(new Vector2(x4, y6), width, (int)((float)height + Math.Abs(velocity.Y) + 2f)))
24870 {
24871 if (i == Main.myPlayer)
24872 {
24873 Main.cameraX = Main.cameraX + position.X - x4;
24874 }
24875 pulleyDir = 2;
24876 direction = 1;
24877 position.X = x4;
24878 velocity.X = 0f;
24879 }
24880 else
24881 {
24882 x4 = num46 * 16 + 8 - width / 2 + -6;
24883 if (!Collision.SolidCollision(new Vector2(x4, y6), width, (int)((float)height + Math.Abs(velocity.Y) + 2f)))
24884 {
24885 if (i == Main.myPlayer)
24886 {
24887 Main.cameraX = Main.cameraX + position.X - x4;
24888 }
24889 pulleyDir = 2;
24890 direction = -1;
24891 position.X = x4;
24892 velocity.X = 0f;
24893 }
24894 }
24895 }
24896 if (velocity.Y < 0f)
24897 {
24898 velocity.Y *= 0.7f;
24899 }
24900 if (velocity.Y < 3f)
24901 {
24902 velocity.Y += 0.2f;
24903 }
24904 else
24905 {
24906 velocity.Y += 0.1f;
24907 }
24908 if (velocity.Y > maxFallSpeed)
24909 {
24910 velocity.Y = maxFallSpeed;
24911 }
24912 }
24913 else
24914 {
24915 velocity.Y *= 0.7f;
24916 if ((double)velocity.Y > -0.1 && (double)velocity.Y < 0.1)
24917 {
24918 velocity.Y = 0f;
24919 }
24920 }
24921 }
24922 else if (controlDown)
24923 {
24924 ropeCount = 10;
24925 pulley = false;
24926 velocity.Y = 1f;
24927 }
24928 else
24929 {
24930 velocity.Y = 0f;
24931 position.Y = num48 * 16 + 22;
24932 }
24933 float num50 = num46 * 16 + 8 - width / 2;
24934 if (pulleyDir == 1)
24935 {
24936 num50 = num46 * 16 + 8 - width / 2;
24937 }
24938 if (pulleyDir == 2)
24939 {
24940 num50 = num46 * 16 + 8 - width / 2 + 6 * direction;
24941 }
24942 if (i == Main.myPlayer)
24943 {
24944 Main.cameraX += position.X - num50;
24945 Main.cameraX = MathHelper.Clamp(Main.cameraX, -32f, 32f);
24946 }
24947 position.X = num50;
24948 pulleyFrameCounter += Math.Abs(velocity.Y * 0.75f);
24949 if (velocity.Y != 0f)
24950 {
24951 pulleyFrameCounter += 0.75f;
24952 }
24953 if (pulleyFrameCounter > 10f)
24954 {
24955 pulleyFrame++;
24957 }
24958 if (pulleyFrame > 1)
24959 {
24960 pulleyFrame = 0;
24961 }
24962 canCarpet = true;
24963 carpetFrame = -1;
24966 rocketDelay = 0;
24967 rocketFrame = false;
24968 canRocket = false;
24969 rocketRelease = false;
24970 DashMovement();
24972 }
24973 else if (grappling[0] == -1 && !tongued)
24974 {
24975 if (wingsLogic > 0 && velocity.Y != 0f && !merman && !mount.Active)
24976 {
24978 }
24979 if (empressBrooch)
24980 {
24981 runAcceleration *= 1.75f;
24982 }
24983 if (hasMagiluminescence && velocity.Y == 0f)
24984 {
24985 runAcceleration *= 1.75f;
24986 maxRunSpeed *= 1.15f;
24987 accRunSpeed *= 1.15f;
24988 runSlowdown *= 1.75f;
24989 }
24990 if (shadowArmor)
24991 {
24992 runAcceleration *= 1.75f;
24993 maxRunSpeed *= 1.15f;
24994 accRunSpeed *= 1.15f;
24995 runSlowdown *= 1.75f;
24996 }
24997 if (mount.Active && mount.Type == 43 && velocity.Y != 0f)
24998 {
24999 runSlowdown = 0f;
25000 }
25001 if (sticky)
25002 {
25003 maxRunSpeed *= 0.25f;
25004 runAcceleration *= 0.25f;
25005 runSlowdown *= 2f;
25006 if (velocity.X > maxRunSpeed)
25007 {
25008 velocity.X = maxRunSpeed;
25009 }
25010 if (velocity.X < 0f - maxRunSpeed)
25011 {
25012 velocity.X = 0f - maxRunSpeed;
25013 }
25014 }
25015 else if (powerrun)
25016 {
25017 maxRunSpeed *= 3.5f;
25018 runAcceleration *= 1f;
25019 runSlowdown *= 2f;
25020 }
25021 else if (runningOnSand && desertBoots)
25022 {
25023 float num51 = 1.75f;
25024 maxRunSpeed *= num51;
25025 accRunSpeed *= num51;
25027 runSlowdown *= num51;
25028 }
25029 else if (slippy2)
25030 {
25031 runAcceleration *= 0.6f;
25032 runSlowdown = 0f;
25033 if (iceSkate)
25034 {
25035 runAcceleration *= 3.5f;
25036 maxRunSpeed *= 1.25f;
25037 }
25038 }
25039 else if (slippy)
25040 {
25041 runAcceleration *= 0.7f;
25042 if (iceSkate)
25043 {
25044 runAcceleration *= 3.5f;
25045 maxRunSpeed *= 1.25f;
25046 }
25047 else
25048 {
25049 runSlowdown *= 0.1f;
25050 }
25051 }
25053 if (carpetFrame != -1)
25054 {
25055 runAcceleration *= 1.25f;
25056 maxRunSpeed *= 1.5f;
25057 }
25058 if (inventory[selectedItem].type == 3106 && stealth < 1f)
25059 {
25060 float num52 = maxRunSpeed / 2f * (1f - stealth);
25061 maxRunSpeed -= num52;
25063 }
25064 if (mount.Active)
25065 {
25066 rocketBoots = 0;
25068 wings = 0;
25069 wingsLogic = 0;
25073 if (mount.Type == 12 && !MountFishronSpecial)
25074 {
25075 runAcceleration /= 2f;
25076 maxRunSpeed /= 2f;
25077 }
25079 if (mount.Cart && velocity.Y == 0f)
25080 {
25081 if (!Minecart.OnTrack(position, width, height))
25082 {
25083 fullRotation = 0f;
25084 onWrongGround = true;
25085 runSlowdown = 0.2f;
25087 {
25088 mount.Dismount(this);
25089 }
25090 }
25091 else
25092 {
25094 onWrongGround = false;
25095 }
25096 }
25097 if (mount.Type == 8)
25098 {
25100 }
25101 }
25104 bool flag13 = !mount.Active;
25105 if (forcedGravity > 0)
25106 {
25107 gravDir = -1f;
25108 }
25109 else if (gravControl && flag13)
25110 {
25111 if (controlUp && releaseUp)
25112 {
25113 if (gravDir == 1f)
25114 {
25115 gravDir = -1f;
25116 fallStart = (int)(position.Y / 16f);
25117 jump = 0;
25119 }
25120 else
25121 {
25122 gravDir = 1f;
25123 fallStart = (int)(position.Y / 16f);
25124 jump = 0;
25126 }
25127 }
25128 }
25129 else if (gravControl2 && flag13)
25130 {
25131 if (controlUp && releaseUp)
25132 {
25133 if (gravDir == 1f)
25134 {
25135 gravDir = -1f;
25136 fallStart = (int)(position.Y / 16f);
25137 jump = 0;
25139 }
25140 else
25141 {
25142 gravDir = 1f;
25143 fallStart = (int)(position.Y / 16f);
25144 jump = 0;
25146 }
25147 }
25148 }
25149 else
25150 {
25151 gravDir = 1f;
25152 }
25153 if (velocity.Y == 0f && mount.Active && mount.CanHover() && controlUp && releaseUp)
25154 {
25155 velocity.Y = 0f - (mount.Acceleration + gravity + 0.001f);
25156 }
25158 sandStorm = false;
25159 JumpMovement();
25160 if (wingsLogic == 0)
25161 {
25162 wingTime = 0f;
25163 }
25164 if (rocketBoots == 0)
25165 {
25166 rocketTime = 0;
25167 }
25168 if (jump == 0)
25169 {
25171 }
25172 DashMovement();
25176 if (wingsLogic > 0 || mount.Active)
25177 {
25178 sandStorm = false;
25179 }
25180 if (((gravDir == 1f && velocity.Y > 0f - jumpSpeed) || (gravDir == -1f && velocity.Y < jumpSpeed)) && velocity.Y != 0f)
25181 {
25182 canRocket = true;
25183 }
25184 bool flag14 = false;
25185 if (((velocity.Y == 0f || sliding) && releaseJump) || (autoJump && justJumped))
25186 {
25189 }
25190 if (wingsLogic > 0 && controlJump && wingTime > 0f && jump == 0 && velocity.Y != 0f)
25191 {
25192 flag14 = true;
25193 }
25194 if ((wingsLogic == 22 || wingsLogic == 28 || wingsLogic == 30 || wingsLogic == 32 || wingsLogic == 29 || wingsLogic == 33 || wingsLogic == 35 || wingsLogic == 37 || wingsLogic == 45) && controlJump && TryingToHoverDown && wingTime > 0f)
25195 {
25196 flag14 = true;
25197 }
25198 if (frozen || webbed || stoned)
25199 {
25200 if (mount.Active)
25201 {
25202 mount.Dismount(this);
25203 }
25204 velocity.Y += gravity;
25205 if (velocity.Y > maxFallSpeed)
25206 {
25207 velocity.Y = maxFallSpeed;
25208 }
25209 sandStorm = false;
25211 }
25212 else
25213 {
25215 if (flag14)
25216 {
25218 WingMovement();
25219 }
25221 if (wingsLogic > 0 && rocketBoots != 0 && velocity.Y != 0f && rocketTime != 0)
25222 {
25223 int num53 = 6;
25224 int num54 = rocketTime * num53;
25225 wingTime += num54;
25226 if (wingTime > (float)(wingTimeMax + num54))
25227 {
25229 }
25230 rocketTime = 0;
25231 }
25232 if (!isCustomWings && flag14 && wings != 4 && wings != 22 && wings != 0 && wings != 24 && wings != 28 && wings != 30 && wings != 33 && wings != 45)
25233 {
25234 bool flag15 = wingFrame == 3;
25235 if (wings == 43 || wings == 44)
25236 {
25237 flag15 = wingFrame == 4;
25238 }
25239 if (flag15)
25240 {
25241 if (!flapSound)
25242 {
25244 }
25245 flapSound = true;
25246 }
25247 else
25248 {
25249 flapSound = false;
25250 }
25251 }
25252 if (velocity.Y == 0f || sliding || (autoJump && justJumped))
25253 {
25255 }
25256 if (empressBrooch)
25257 {
25259 }
25260 if ((wingTime == 0f || wingsLogic == 0) && rocketBoots != 0 && controlJump && rocketDelay == 0 && canRocket && rocketRelease && !AnyExtraJumpUsable())
25261 {
25262 if (rocketTime > 0)
25263 {
25264 rocketTime--;
25265 rocketDelay = 10;
25266 if (rocketDelay2 <= 0)
25267 {
25268 if (rocketBoots == 1)
25269 {
25270 rocketDelay2 = 30;
25271 }
25272 else if (rocketBoots == 2 || rocketBoots == 5 || rocketBoots == 3 || rocketBoots == 4)
25273 {
25274 rocketDelay2 = 15;
25275 }
25276 }
25277 if (rocketSoundDelay <= 0)
25278 {
25279 if (vanityRocketBoots == 1 || vanityRocketBoots == 5)
25280 {
25281 rocketSoundDelay = 30;
25283 }
25284 else if (vanityRocketBoots == 2 || vanityRocketBoots == 3 || vanityRocketBoots == 4)
25285 {
25286 rocketSoundDelay = 15;
25288 }
25289 }
25290 }
25291 else
25292 {
25293 canRocket = false;
25294 }
25295 }
25296 if (rocketSoundDelay > 0)
25297 {
25299 }
25300 if (rocketDelay2 > 0)
25301 {
25302 rocketDelay2--;
25303 }
25304 if (rocketDelay == 0)
25305 {
25306 rocketFrame = false;
25307 }
25308 if (rocketDelay > 0)
25309 {
25310 rocketFrame = true;
25312 if (rocketDelay == 0)
25313 {
25314 releaseJump = true;
25315 }
25316 rocketDelay--;
25317 velocity.Y -= 0.1f * gravDir;
25318 if (gravDir == 1f)
25319 {
25320 if (velocity.Y > 0f)
25321 {
25322 velocity.Y -= 0.5f;
25323 }
25324 else if ((double)velocity.Y > (double)(0f - jumpSpeed) * 0.5)
25325 {
25326 velocity.Y -= 0.1f;
25327 }
25328 if (velocity.Y < (0f - jumpSpeed) * 1.5f)
25329 {
25330 velocity.Y = (0f - jumpSpeed) * 1.5f;
25331 }
25332 }
25333 else
25334 {
25335 if (velocity.Y < 0f)
25336 {
25337 velocity.Y += 0.5f;
25338 }
25339 else if ((double)velocity.Y < (double)jumpSpeed * 0.5)
25340 {
25341 velocity.Y += 0.1f;
25342 }
25343 if (velocity.Y > jumpSpeed * 1.5f)
25344 {
25345 velocity.Y = jumpSpeed * 1.5f;
25346 }
25347 }
25348 }
25349 else if (!flag14)
25350 {
25351 if (mount.CanHover())
25352 {
25353 mount.Hover(this);
25354 }
25355 else if (mount.CanFly() && controlJump && jump == 0)
25356 {
25357 if (mount.Flight())
25358 {
25360 {
25361 velocity.Y *= 0.9f;
25362 if (velocity.Y > -1f && (double)velocity.Y < 0.5)
25363 {
25364 velocity.Y = 1E-05f;
25365 }
25366 }
25367 else
25368 {
25369 float num55 = jumpSpeed;
25370 if (mount.Type == 50)
25371 {
25372 num55 *= 0.5f;
25373 }
25374 if (velocity.Y > 0f)
25375 {
25376 velocity.Y -= 0.5f;
25377 }
25378 else if ((double)velocity.Y > (double)(0f - num55) * 1.5)
25379 {
25380 velocity.Y -= 0.1f;
25381 }
25382 if (velocity.Y < (0f - num55) * 1.5f)
25383 {
25384 velocity.Y = (0f - num55) * 1.5f;
25385 }
25386 }
25387 }
25388 else
25389 {
25390 velocity.Y += gravity / 3f * gravDir;
25391 if (gravDir == 1f)
25392 {
25394 {
25395 velocity.Y = maxFallSpeed / 3f;
25396 }
25397 }
25398 else if (velocity.Y < (0f - maxFallSpeed) / 3f && !TryingToHoverUp)
25399 {
25400 velocity.Y = (0f - maxFallSpeed) / 3f;
25401 }
25402 }
25403 }
25404 else if (slowFall && !TryingToHoverDown)
25405 {
25406 if (TryingToHoverUp)
25407 {
25408 gravity = gravity / 10f * gravDir;
25409 }
25410 else
25411 {
25412 gravity = gravity / 3f * gravDir;
25413 }
25414 velocity.Y += gravity;
25415 }
25416 else if (wingsLogic > 0 && controlJump && velocity.Y > 0f)
25417 {
25418 bool noLightEmittence = wingsLogic != wings;
25419 fallStart = (int)(position.Y / 16f);
25420 if (velocity.Y > 0f)
25421 {
25422 if (wings == 10 && Main.rand.Next(3) == 0)
25423 {
25424 int num56 = 4;
25425 if (direction == 1)
25426 {
25427 num56 = -40;
25428 }
25429 int num57 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num56, position.Y + (float)(height / 2) - 15f), 30, 30, 76, 0f, 0f, 50, default(Color), 0.6f);
25430 Main.dust[num57].fadeIn = 1.1f;
25431 Main.dust[num57].noGravity = true;
25432 Main.dust[num57].noLight = true;
25433 Dust obj4 = Main.dust[num57];
25434 obj4.velocity *= 0.3f;
25435 Main.dust[num57].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25436 }
25437 if (wings == 34 && ShouldDrawWingsThatAreAlwaysAnimated() && Main.rand.Next(3) == 0)
25438 {
25439 int num59 = 4;
25440 if (direction == 1)
25441 {
25442 num59 = -40;
25443 }
25444 int num60 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num59, position.Y + (float)(height / 2) - 15f), 30, 30, 261, 0f, 0f, 50, default(Color), 0.6f);
25445 Main.dust[num60].fadeIn = 1.1f;
25446 Main.dust[num60].noGravity = true;
25447 Main.dust[num60].noLight = true;
25448 Main.dust[num60].noLightEmittence = noLightEmittence;
25449 Dust obj5 = Main.dust[num60];
25450 obj5.velocity *= 0.3f;
25451 Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25452 }
25453 if (wings == 40)
25454 {
25456 }
25457 if (wings == 44)
25458 {
25460 }
25461 if (wings == 9 && Main.rand.Next(3) == 0)
25462 {
25463 int num61 = 8;
25464 if (direction == 1)
25465 {
25466 num61 = -40;
25467 }
25468 int num62 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num61, position.Y + (float)(height / 2) - 15f), 30, 30, 6, 0f, 0f, 200, default(Color), 2f);
25469 Main.dust[num62].noGravity = true;
25470 Dust obj6 = Main.dust[num62];
25471 obj6.velocity *= 0.3f;
25472 Main.dust[num62].noLightEmittence = noLightEmittence;
25473 Main.dust[num62].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25474 }
25475 if (wings == 29 && Main.rand.Next(3) == 0)
25476 {
25477 int num63 = 8;
25478 if (direction == 1)
25479 {
25480 num63 = -40;
25481 }
25482 int num64 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num63, position.Y + (float)(height / 2) - 15f), 30, 30, 6, 0f, 0f, 100, default(Color), 2.4f);
25483 Main.dust[num64].noGravity = true;
25484 Dust obj7 = Main.dust[num64];
25485 obj7.velocity *= 0.3f;
25486 Main.dust[num64].noLightEmittence = noLightEmittence;
25487 if (Main.rand.Next(10) == 0)
25488 {
25489 Main.dust[num64].fadeIn = 2f;
25490 }
25491 Main.dust[num64].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25492 }
25493 if (wings == 6)
25494 {
25495 if (Main.rand.Next(10) == 0)
25496 {
25497 int num65 = 4;
25498 if (direction == 1)
25499 {
25500 num65 = -40;
25501 }
25502 int num66 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num65, position.Y + (float)(height / 2) - 12f), 30, 20, 55, 0f, 0f, 200);
25503 Main.dust[num66].noLightEmittence = noLightEmittence;
25504 Dust obj8 = Main.dust[num66];
25505 obj8.velocity *= 0.3f;
25506 Main.dust[num66].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25507 }
25508 }
25509 else if (wings == 5 && Main.rand.Next(6) == 0)
25510 {
25511 int num67 = 6;
25512 if (direction == 1)
25513 {
25514 num67 = -30;
25515 }
25516 int num68 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num67, position.Y), 18, height, 58, 0f, 0f, 255, default(Color), 1.2f);
25517 Dust obj9 = Main.dust[num68];
25518 obj9.velocity *= 0.3f;
25519 Main.dust[num68].noLightEmittence = noLightEmittence;
25520 Main.dust[num68].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25521 }
25522 if (!isCustomWings)
25523 {
25524 if (wings == 4)
25525 {
25526 rocketDelay2--;
25527 if (rocketDelay2 <= 0)
25528 {
25530 rocketDelay2 = 60;
25531 }
25532 int type = 6;
25533 float scale = 1.5f;
25534 int alpha = 100;
25535 float x5 = position.X + (float)(width / 2) + 16f;
25536 if (direction > 0)
25537 {
25538 x5 = position.X + (float)(width / 2) - 26f;
25539 }
25540 float num70 = position.Y + (float)height - 18f;
25541 if (Main.rand.Next(2) == 1)
25542 {
25543 x5 = position.X + (float)(width / 2) + 8f;
25544 if (direction > 0)
25545 {
25546 x5 = position.X + (float)(width / 2) - 20f;
25547 }
25548 num70 += 6f;
25549 }
25550 int num71 = Dust.NewDust(new Vector2(x5, num70), 8, 8, type, 0f, 0f, alpha, default(Color), scale);
25551 Main.dust[num71].velocity.X *= 0.3f;
25552 Main.dust[num71].velocity.Y += 10f;
25553 Main.dust[num71].noGravity = true;
25554 Main.dust[num71].noLightEmittence = noLightEmittence;
25555 Main.dust[num71].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25557 if (wingFrameCounter > 4)
25558 {
25559 wingFrame++;
25560 wingFrameCounter = 0;
25561 if (wingFrame >= 3)
25562 {
25563 wingFrame = 0;
25564 }
25565 }
25566 }
25567 else if (wings != 22 && wings != 28)
25568 {
25569 if (wings == 30)
25570 {
25572 int num72 = 5;
25573 if (wingFrameCounter >= num72 * 3)
25574 {
25575 wingFrameCounter = 0;
25576 }
25578 }
25579 else if (wings == 34)
25580 {
25582 int num73 = 7;
25583 if (wingFrameCounter >= num73 * 6)
25584 {
25585 wingFrameCounter = 0;
25586 }
25588 }
25589 else if (wings != 45)
25590 {
25591 if (wings == 40)
25592 {
25593 wingFrame = 0;
25594 }
25595 else if (wings == 44)
25596 {
25597 wingFrame = 2;
25598 }
25599 else if (wings == 39)
25600 {
25602 int num74 = 12;
25603 if (wingFrameCounter >= num74 * 6)
25604 {
25605 wingFrameCounter = 0;
25606 }
25608 }
25609 else if (wings == 26)
25610 {
25611 int num75 = 6;
25612 if (direction == 1)
25613 {
25614 num75 = -30;
25615 }
25616 int num76 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num75, position.Y), 18, height, 217, 0f, 0f, 100, default(Color), 1.4f);
25617 Main.dust[num76].noGravity = true;
25618 Main.dust[num76].noLight = true;
25619 Dust obj10 = Main.dust[num76];
25620 obj10.velocity /= 4f;
25621 Dust obj11 = Main.dust[num76];
25622 obj11.velocity -= velocity;
25623 Main.dust[num76].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25624 if (Main.rand.Next(2) == 0)
25625 {
25626 num75 = -24;
25627 if (direction == 1)
25628 {
25629 num75 = 12;
25630 }
25631 float num77 = position.Y;
25632 if (gravDir == -1f)
25633 {
25634 num77 += (float)(height / 2);
25635 }
25636 num76 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num75, num77), 12, height / 2, 217, 0f, 0f, 100, default(Color), 1.4f);
25637 Main.dust[num76].noGravity = true;
25638 Main.dust[num76].noLight = true;
25639 Dust obj12 = Main.dust[num76];
25640 obj12.velocity /= 4f;
25641 Dust obj13 = Main.dust[num76];
25642 obj13.velocity -= velocity;
25643 Main.dust[num76].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25644 }
25645 wingFrame = 2;
25646 }
25647 else if (wings == 37)
25648 {
25649 Color color = Color.Lerp(Color.Black, Color.White, Main.rand.NextFloat());
25650 int num78 = 6;
25651 if (direction == 1)
25652 {
25653 num78 = -30;
25654 }
25655 int num79 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num78, position.Y), 24, height, Utils.SelectRandom<int>(Main.rand, 31, 31, 31), 0f, 0f, 100, default(Color), 0.7f);
25656 Main.dust[num79].noGravity = true;
25657 Main.dust[num79].noLight = true;
25658 Dust obj14 = Main.dust[num79];
25659 obj14.velocity /= 4f;
25660 Dust obj15 = Main.dust[num79];
25661 obj15.velocity -= velocity;
25662 Main.dust[num79].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25663 if (Main.dust[num79].type == 55)
25664 {
25665 Main.dust[num79].color = color;
25666 }
25667 if (Main.rand.Next(3) == 0)
25668 {
25669 num78 = -24;
25670 if (direction == 1)
25671 {
25672 num78 = 12;
25673 }
25674 float num81 = position.Y;
25675 if (gravDir == -1f)
25676 {
25677 num81 += (float)(height / 2);
25678 }
25679 num79 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num78, num81), 12, height / 2, Utils.SelectRandom<int>(Main.rand, 31, 31, 31), 0f, 0f, 140, default(Color), 0.7f);
25680 Main.dust[num79].noGravity = true;
25681 Main.dust[num79].noLight = true;
25682 Dust obj16 = Main.dust[num79];
25683 obj16.velocity /= 4f;
25684 Dust obj17 = Main.dust[num79];
25685 obj17.velocity -= velocity;
25686 Main.dust[num79].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
25687 if (Main.dust[num79].type == 55)
25688 {
25689 Main.dust[num79].color = color;
25690 }
25691 }
25692 wingFrame = 2;
25693 }
25694 else if (wings != 24)
25695 {
25696 if (wings == 43)
25697 {
25698 wingFrame = 1;
25699 }
25700 else if (wings == 12)
25701 {
25702 wingFrame = 3;
25703 }
25704 else
25705 {
25706 wingFrame = 2;
25707 }
25708 }
25709 }
25710 }
25711 }
25712 }
25713 velocity.Y += gravity / 3f * gravDir;
25714 if (gravDir == 1f)
25715 {
25717 {
25718 velocity.Y = maxFallSpeed / 3f;
25719 }
25720 }
25721 else if (velocity.Y < (0f - maxFallSpeed) / 3f && !TryingToHoverUp)
25722 {
25723 velocity.Y = (0f - maxFallSpeed) / 3f;
25724 }
25725 }
25726 else if (cartRampTime <= 0)
25727 {
25728 velocity.Y += gravity * gravDir;
25729 }
25730 else
25731 {
25732 cartRampTime--;
25733 }
25734 }
25735 if (!mount.Active || mount.Type != 5)
25736 {
25737 if (gravDir == 1f)
25738 {
25739 if (velocity.Y > maxFallSpeed)
25740 {
25741 velocity.Y = maxFallSpeed;
25742 }
25744 {
25745 velocity.Y = maxFallSpeed / 3f;
25746 }
25748 {
25749 velocity.Y = maxFallSpeed / 10f;
25750 }
25751 }
25752 else
25753 {
25754 if (velocity.Y < 0f - maxFallSpeed)
25755 {
25756 velocity.Y = 0f - maxFallSpeed;
25757 }
25758 if (slowFall && velocity.Y < (0f - maxFallSpeed) / 3f && !TryingToHoverDown)
25759 {
25760 velocity.Y = (0f - maxFallSpeed) / 3f;
25761 }
25762 if (slowFall && velocity.Y < (0f - maxFallSpeed) / 5f && TryingToHoverUp)
25763 {
25764 velocity.Y = (0f - maxFallSpeed) / 10f;
25765 }
25766 }
25767 }
25768 }
25769 }
25770 else
25771 {
25773 }
25774 if (mount.Active)
25775 {
25776 wingFrame = 0;
25777 }
25778 if ((wingsLogic == 22 || wingsLogic == 28 || wingsLogic == 30 || wingsLogic == 31 || wingsLogic == 33 || wingsLogic == 35 || wingsLogic == 37 || wingsLogic == 45) && TryingToHoverDown && controlJump && wingTime > 0f && !merman)
25779 {
25780 float num82 = 0.9f;
25781 if (wingsLogic == 45)
25782 {
25783 num82 = 0.8f;
25784 }
25785 velocity.Y *= num82;
25786 if (velocity.Y > -2f && velocity.Y < 1f)
25787 {
25788 velocity.Y = 1E-05f;
25789 }
25790 }
25791 if (wingsLogic == 37 && TryingToHoverDown && controlJump && wingTime > 0f && !merman)
25792 {
25793 velocity.Y *= 0.92f;
25794 if (velocity.Y > -2f && velocity.Y < 1f)
25795 {
25796 velocity.Y = 1E-05f;
25797 }
25798 }
25799 GrabItems(i);
25801 if (tongued)
25802 {
25804 bool flag16 = false;
25805 if (Main.wofNPCIndex >= 0)
25806 {
25807 NPC nPC = Main.npc[Main.wofNPCIndex];
25808 float num113 = nPC.Center.X + (float)(nPC.direction * 200);
25809 float y7 = nPC.Center.Y;
25810 Vector2 center = base.Center;
25811 float num83 = num113 - center.X;
25812 float num84 = y7 - center.Y;
25813 float num85 = (float)Math.Sqrt(num83 * num83 + num84 * num84);
25814 float num86 = 11f;
25815 if (Main.expertMode)
25816 {
25817 float value = 22f;
25818 float amount = Math.Min(1f, ((Vector2)(ref nPC.velocity)).Length() / 5f);
25819 num86 = MathHelper.Lerp(num86, value, amount);
25820 }
25821 float num87 = num85;
25822 if (num85 > num86)
25823 {
25824 num87 = num86 / num85;
25825 }
25826 else
25827 {
25828 num87 = 1f;
25829 flag16 = true;
25830 }
25831 num83 *= num87;
25832 num84 *= num87;
25833 velocity.X = num83;
25834 velocity.Y = num84;
25835 }
25836 else
25837 {
25838 flag16 = true;
25839 }
25840 if (flag16 && Main.myPlayer == whoAmI)
25841 {
25842 for (int num88 = 0; num88 < maxBuffs; num88++)
25843 {
25844 if (buffType[num88] == 38)
25845 {
25846 DelBuff(num88);
25847 }
25848 }
25849 }
25850 }
25851 if (Main.myPlayer == whoAmI)
25852 {
25853 WOFTongue();
25854 if (controlHook)
25855 {
25856 if (releaseHook)
25857 {
25858 QuickGrapple();
25859 }
25860 releaseHook = false;
25861 }
25862 else
25863 {
25864 releaseHook = true;
25865 }
25866 if (talkNPC >= 0)
25867 {
25868 Rectangle rectangle = default(Rectangle);
25869 ((Rectangle)(ref rectangle))._002Ector((int)(position.X + (float)(width / 2) - (float)(tileRangeX * 16)), (int)(position.Y + (float)(height / 2) - (float)(tileRangeY * 16)), tileRangeX * 16 * 2, tileRangeY * 16 * 2);
25870 Rectangle value2 = default(Rectangle);
25871 ((Rectangle)(ref value2))._002Ector((int)Main.npc[talkNPC].position.X, (int)Main.npc[talkNPC].position.Y, Main.npc[talkNPC].width, Main.npc[talkNPC].height);
25872 if (!((Rectangle)(ref rectangle)).Intersects(value2) || chest != -1 || !Main.npc[talkNPC].active || tileEntityAnchor.InUse)
25873 {
25874 if (chest == -1)
25875 {
25877 }
25878 SetTalkNPC(-1);
25879 Main.npcChatCornerItem = 0;
25880 Main.npcChatText = "";
25881 }
25882 }
25883 if (sign >= 0)
25884 {
25885 Rectangle value3 = default(Rectangle);
25886 ((Rectangle)(ref value3))._002Ector((int)(position.X + (float)(width / 2) - (float)(tileRangeX * 16)), (int)(position.Y + (float)(height / 2) - (float)(tileRangeY * 16)), tileRangeX * 16 * 2, tileRangeY * 16 * 2);
25887 try
25888 {
25889 bool flag17 = false;
25890 if (Main.sign[sign] == null)
25891 {
25892 flag17 = true;
25893 }
25894 if (!flag17)
25895 {
25896 val = new Rectangle(Main.sign[sign].x * 16, Main.sign[sign].y * 16, 32, 32);
25897 if (!((Rectangle)(ref val)).Intersects(value3))
25898 {
25899 flag17 = true;
25900 }
25901 }
25902 if (flag17)
25903 {
25905 sign = -1;
25906 Main.editSign = false;
25907 Main.npcChatText = "";
25908 }
25909 }
25910 catch
25911 {
25913 sign = -1;
25914 Main.editSign = false;
25915 Main.npcChatText = "";
25916 }
25917 }
25918 if (Main.editSign)
25919 {
25920 if (sign == -1)
25921 {
25922 Main.editSign = false;
25923 }
25924 else
25925 {
25926 Main.InputTextSign();
25927 }
25928 }
25929 else if (Main.editChest)
25930 {
25931 Main.InputTextChest();
25932 if (Main.player[Main.myPlayer].chest == -1)
25933 {
25934 Main.editChest = false;
25935 }
25936 }
25937 if (mount.Active && mount.Cart && ((Vector2)(ref velocity)).Length() > 4f)
25938 {
25939 Rectangle rectangle2 = default(Rectangle);
25940 ((Rectangle)(ref rectangle2))._002Ector((int)position.X, (int)position.Y, width, height);
25941 if (velocity.X < -1f)
25942 {
25943 rectangle2.X -= 15;
25944 }
25945 if (velocity.X > 1f)
25946 {
25947 rectangle2.Width += 15;
25948 }
25949 if (velocity.X < -10f)
25950 {
25951 rectangle2.X -= 10;
25952 }
25953 if (velocity.X > 10f)
25954 {
25955 rectangle2.Width += 10;
25956 }
25957 if (velocity.Y < -1f)
25958 {
25959 rectangle2.Y -= 10;
25960 }
25961 if (velocity.Y > 1f)
25962 {
25963 rectangle2.Height += 10;
25964 }
25965 for (int num89 = 0; num89 < 200; num89++)
25966 {
25967 if (Main.npc[num89].active && !Main.npc[num89].dontTakeDamage && !Main.npc[num89].friendly && Main.npc[num89].immune[i] == 0 && CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[num89]) && ((Rectangle)(ref rectangle2)).Intersects(new Rectangle((int)Main.npc[num89].position.X, (int)Main.npc[num89].position.Y, Main.npc[num89].width, Main.npc[num89].height)))
25968 {
25969 float num91 = DamageClassLoader.DamageClasses.Select((DamageClass t) => GetTotalCritChance(t)).Max();
25970 bool crit = false;
25971 if ((float)Main.rand.Next(1, 101) <= num91)
25972 {
25973 crit = true;
25974 }
25975 float currentSpeed = ((Vector2)(ref velocity)).Length() / maxRunSpeed;
25977 int num92 = 1;
25978 if (velocity.X < 0f)
25979 {
25980 num92 = -1;
25981 }
25982 if (Main.npc[num89].knockBackResist < 1f && Main.npc[num89].knockBackResist > 0f)
25983 {
25984 knockback /= Main.npc[num89].knockBackResist;
25985 }
25986 if (whoAmI == Main.myPlayer)
25987 {
25988 ApplyDamageToNPC(Main.npc[num89], damage2, knockback, num92, crit);
25989 }
25990 Main.npc[num89].immune[i] = 30;
25991 if (!Main.npc[num89].active)
25992 {
25994 }
25995 }
25996 }
25997 }
25999 if (!shimmering)
26000 {
26001 Collision.HurtTile hurtTile = GetHurtTile();
26002 if (hurtTile.type >= 0)
26003 {
26005 }
26006 }
26008 }
26009 if (controlRight)
26010 {
26011 releaseRight = false;
26012 }
26013 else
26014 {
26015 releaseRight = true;
26016 rightTimer = 7;
26017 }
26018 if (controlLeft)
26019 {
26020 releaseLeft = false;
26021 }
26022 else
26023 {
26024 releaseLeft = true;
26025 leftTimer = 7;
26026 }
26028 if (rightTimer > 0)
26029 {
26030 rightTimer--;
26031 }
26032 else if (controlRight)
26033 {
26034 rightTimer = 7;
26035 }
26036 if (leftTimer > 0)
26037 {
26038 leftTimer--;
26039 }
26040 else if (controlLeft)
26041 {
26042 leftTimer = 7;
26043 }
26046 CheckDrowning();
26047 if (gravDir == -1f)
26048 {
26049 waterWalk = false;
26050 waterWalk2 = false;
26051 }
26052 int num93 = height;
26053 if (waterWalk)
26054 {
26055 num93 -= 6;
26056 }
26057 bool flag18 = false;
26058 if (!shimmering)
26059 {
26060 flag18 = Collision.LavaCollision(position, width, num93);
26061 }
26062 if (flag18)
26063 {
26064 if (!lavaImmune && Main.myPlayer == i && hurtCooldowns[4] <= 0)
26065 {
26066 if (lavaTime > 0)
26067 {
26068 lavaTime--;
26069 }
26070 else
26071 {
26072 int num94 = 80;
26073 int num95 = 420;
26074 if (Main.remixWorld)
26075 {
26076 num94 = 200;
26077 num95 = 630;
26078 }
26079 if (!ashWoodBonus || !lavaRose)
26080 {
26081 if (ashWoodBonus)
26082 {
26083 if (Main.remixWorld)
26084 {
26085 num94 = 145;
26086 }
26087 num94 /= 2;
26088 num95 -= 210;
26089 }
26090 if (lavaRose)
26091 {
26092 num94 -= 45;
26093 num95 -= 210;
26094 }
26095 if (num94 > 0)
26096 {
26098 }
26099 if (num95 > 0)
26100 {
26101 AddBuff(24, num95);
26102 }
26103 }
26104 }
26105 }
26106 lavaWet = true;
26107 }
26108 else
26109 {
26110 lavaWet = false;
26111 if (lavaTime < lavaMax)
26112 {
26113 lavaTime++;
26114 }
26115 }
26116 if (lavaTime > lavaMax)
26117 {
26118 lavaTime = lavaMax;
26119 }
26120 if (waterWalk2 && !waterWalk)
26121 {
26122 num93 -= 6;
26123 }
26124 bool num114 = Collision.WetCollision(position, width, height);
26125 bool flag19 = Collision.honey;
26126 bool shimmer = Collision.shimmer;
26127 if (shimmer)
26128 {
26129 shimmerWet = true;
26130 if (whoAmI == Main.myPlayer && !shimmerImmune && !shimmerUnstuckHelper.ShouldUnstuck)
26131 {
26132 int num96 = (int)(base.Center.X / 16f);
26133 int num97 = (int)((position.Y + 1f) / 16f);
26134 if (Main.tile[num96, num97] != null && Main.tile[num96, num97].shimmer() && Main.tile[num96, num97].liquid >= 0 && position.Y / 16f < (float)Main.UnderworldLayer)
26135 {
26136 AddBuff(353, 60);
26137 }
26138 }
26139 }
26140 if (flag19 && !shimmering)
26141 {
26142 AddBuff(48, 1800);
26143 honeyWet = true;
26144 }
26145 if (num114)
26146 {
26147 if ((onFire || onFire3) && !lavaWet)
26148 {
26149 for (int num98 = 0; num98 < maxBuffs; num98++)
26150 {
26151 int num99 = buffType[num98];
26152 if (num99 == 24 || num99 == 323)
26153 {
26154 DelBuff(num98);
26155 }
26156 }
26157 }
26158 if (!wet)
26159 {
26160 if (wetCount == 0)
26161 {
26162 wetCount = 10;
26163 if (!shimmering)
26164 {
26165 if (!flag18)
26166 {
26167 if (shimmerWet)
26168 {
26169 for (int num101 = 0; num101 < 50; num101++)
26170 {
26171 int num102 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2)), width + 12, 24, 308);
26172 Main.dust[num102].velocity.Y -= 4f;
26173 Main.dust[num102].velocity.X *= 2.5f;
26174 Main.dust[num102].scale = 0.8f;
26175 Main.dust[num102].noGravity = true;
26176 switch (Main.rand.Next(6))
26177 {
26178 case 0:
26179 Main.dust[num102].color = new Color(255, 255, 210);
26180 break;
26181 case 1:
26182 Main.dust[num102].color = new Color(190, 245, 255);
26183 break;
26184 case 2:
26185 Main.dust[num102].color = new Color(255, 150, 255);
26186 break;
26187 default:
26188 Main.dust[num102].color = new Color(190, 175, 255);
26189 break;
26190 }
26191 }
26192 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y, 2);
26193 }
26194 else if (honeyWet)
26195 {
26196 for (int num103 = 0; num103 < 20; num103++)
26197 {
26198 int num104 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2) - 8f), width + 12, 24, 152);
26199 Main.dust[num104].velocity.Y -= 1f;
26200 Main.dust[num104].velocity.X *= 2.5f;
26201 Main.dust[num104].scale = 1.3f;
26202 Main.dust[num104].alpha = 100;
26203 Main.dust[num104].noGravity = true;
26204 }
26205 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y);
26206 }
26207 else
26208 {
26209 for (int num105 = 0; num105 < 50; num105++)
26210 {
26211 int num106 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2) - 8f), width + 12, 24, Dust.dustWater());
26212 Main.dust[num106].velocity.Y -= 3f;
26213 Main.dust[num106].velocity.X *= 2.5f;
26214 Main.dust[num106].scale = 0.8f;
26215 Main.dust[num106].alpha = 100;
26216 Main.dust[num106].noGravity = true;
26217 }
26218 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y, 0);
26219 }
26220 }
26221 else
26222 {
26223 for (int num107 = 0; num107 < 20; num107++)
26224 {
26225 int num108 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2) - 8f), width + 12, 24, 35);
26226 Main.dust[num108].velocity.Y -= 1.5f;
26227 Main.dust[num108].velocity.X *= 2.5f;
26228 Main.dust[num108].scale = 1.3f;
26229 Main.dust[num108].alpha = 100;
26230 Main.dust[num108].noGravity = true;
26231 }
26232 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y);
26233 }
26234 }
26235 }
26236 wet = true;
26238 {
26239 velocity.Y /= 2f;
26240 if (velocity.Y > 3f)
26241 {
26242 velocity.Y = 3f;
26243 }
26244 }
26245 }
26246 }
26247 else if (wet)
26248 {
26249 wet = false;
26250 if (jump > jumpHeight / 5 && wetSlime == 0)
26251 {
26252 jump = jumpHeight / 5;
26253 }
26254 if (wetCount == 0)
26255 {
26256 wetCount = 10;
26257 if (!shimmering)
26258 {
26259 if (!lavaWet)
26260 {
26261 if (shimmerWet)
26262 {
26263 for (int num109 = 0; num109 < 50; num109++)
26264 {
26265 int num110 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2)), width + 12, 24, 308);
26266 Main.dust[num110].velocity.Y -= 4f;
26267 Main.dust[num110].velocity.X *= 2.5f;
26268 Main.dust[num110].scale = 0.75f;
26269 Main.dust[num110].noGravity = true;
26270 switch (Main.rand.Next(6))
26271 {
26272 case 0:
26273 Main.dust[num110].color = new Color(255, 255, 210);
26274 break;
26275 case 1:
26276 Main.dust[num110].color = new Color(190, 245, 255);
26277 break;
26278 case 2:
26279 Main.dust[num110].color = new Color(255, 150, 255);
26280 break;
26281 default:
26282 Main.dust[num110].color = new Color(190, 175, 255);
26283 break;
26284 }
26285 }
26286 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y, 3);
26287 }
26288 else if (honeyWet)
26289 {
26290 for (int num11 = 0; num11 < 20; num11++)
26291 {
26292 int num12 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2) - 8f), width + 12, 24, 152);
26293 Main.dust[num12].velocity.Y -= 1f;
26294 Main.dust[num12].velocity.X *= 2.5f;
26295 Main.dust[num12].scale = 1.3f;
26296 Main.dust[num12].alpha = 100;
26297 Main.dust[num12].noGravity = true;
26298 }
26299 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y);
26300 }
26301 else
26302 {
26303 for (int num13 = 0; num13 < 50; num13++)
26304 {
26305 int num14 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2)), width + 12, 24, Dust.dustWater());
26306 Main.dust[num14].velocity.Y -= 4f;
26307 Main.dust[num14].velocity.X *= 2.5f;
26308 Main.dust[num14].scale = 0.8f;
26309 Main.dust[num14].alpha = 100;
26310 Main.dust[num14].noGravity = true;
26311 }
26312 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y, 0);
26313 }
26314 }
26315 else
26316 {
26317 for (int num15 = 0; num15 < 20; num15++)
26318 {
26319 int num16 = Dust.NewDust(new Vector2(position.X - 6f, position.Y + (float)(height / 2) - 8f), width + 12, 24, 35);
26320 Main.dust[num16].velocity.Y -= 1.5f;
26321 Main.dust[num16].velocity.X *= 2.5f;
26322 Main.dust[num16].scale = 1.3f;
26323 Main.dust[num16].alpha = 100;
26324 Main.dust[num16].noGravity = true;
26325 }
26326 SoundEngine.PlaySound(19, (int)position.X, (int)position.Y);
26327 }
26328 }
26329 }
26330 }
26331 if (!flag19)
26332 {
26333 honeyWet = false;
26334 }
26335 if (!shimmer)
26336 {
26337 shimmerWet = false;
26338 }
26339 if (!wet)
26340 {
26341 lavaWet = false;
26342 honeyWet = false;
26343 shimmerWet = false;
26344 }
26345 if (wetCount > 0)
26346 {
26347 wetCount--;
26348 }
26349 if (wetSlime > 0)
26350 {
26351 wetSlime--;
26352 }
26353 if (wet && mount.Active)
26354 {
26355 switch (mount.Type)
26356 {
26357 case 5:
26358 case 7:
26359 if (whoAmI == Main.myPlayer)
26360 {
26361 mount.Dismount(this);
26362 }
26363 break;
26364 case 3:
26365 case 50:
26366 wetSlime = 30;
26367 if (velocity.Y > 2f)
26368 {
26369 velocity.Y *= 0.9f;
26370 }
26371 velocity.Y -= 0.5f;
26372 if (velocity.Y < -4f)
26373 {
26374 velocity.Y = -4f;
26375 }
26376 break;
26377 }
26378 }
26379 if (Main.expertMode && ZoneSnow && wet && !lavaWet && !honeyWet && !arcticDivingGear && environmentBuffImmunityTimer == 0)
26380 {
26381 AddBuff(46, 150);
26382 }
26383 float num17 = 1f + Math.Abs(velocity.X) / 3f;
26384 if (gfxOffY > 0f)
26385 {
26386 gfxOffY -= num17 * stepSpeed;
26387 if (gfxOffY < 0f)
26388 {
26389 gfxOffY = 0f;
26390 }
26391 }
26392 else if (gfxOffY < 0f)
26393 {
26394 gfxOffY += num17 * stepSpeed;
26395 if (gfxOffY > 0f)
26396 {
26397 gfxOffY = 0f;
26398 }
26399 }
26400 if (gfxOffY > 32f)
26401 {
26402 gfxOffY = 32f;
26403 }
26404 if (gfxOffY < -32f)
26405 {
26406 gfxOffY = -32f;
26407 }
26408 if (Main.myPlayer == i)
26409 {
26410 if (!iceSkate)
26411 {
26412 CheckIceBreak();
26413 }
26415 }
26416 if (!shimmering)
26417 {
26419 bool flag20 = mount.Type == 7 || mount.Type == 8 || mount.Type == 12 || mount.Type == 44 || mount.Type == 49;
26420 if (velocity.Y == gravity && (!mount.Active || (!mount.Cart && mount.Type != 48 && !flag20)))
26421 {
26422 Collision.StepDown(ref position, ref velocity, width, height, ref stepSpeed, ref gfxOffY, (int)gravDir, waterWalk || waterWalk2);
26423 }
26424 if (gravDir == -1f)
26425 {
26426 if ((carpetFrame != -1 || velocity.Y <= gravity) && !controlUp)
26427 {
26428 Collision.StepUp(ref position, ref velocity, width, height, ref stepSpeed, ref gfxOffY, (int)gravDir, controlUp);
26429 }
26430 }
26431 else if ((carpetFrame != -1 || velocity.Y >= gravity) && !controlDown && !mount.Cart && !flag20 && grappling[0] == -1)
26432 {
26433 Collision.StepUp(ref position, ref velocity, width, height, ref stepSpeed, ref gfxOffY, (int)gravDir, controlUp);
26434 }
26435 }
26438 bool falling = false;
26439 if (velocity.Y > gravity)
26440 {
26441 falling = true;
26442 }
26443 if (velocity.Y < 0f - gravity)
26444 {
26445 falling = true;
26446 }
26447 Vector2 vector3 = velocity;
26448 slideDir = 0;
26449 bool ignorePlats = false;
26450 bool fallThrough = controlDown;
26451 if ((gravDir == -1f) | (mount.Active && (mount.Cart || mount.Type == 12 || mount.Type == 7 || mount.Type == 8 || mount.Type == 23 || mount.Type == 44 || mount.Type == 48)) | GoingDownWithGrapple | pulley)
26452 {
26453 ignorePlats = true;
26454 fallThrough = true;
26455 }
26456 bool flag21 = onTrack;
26457 onTrack = false;
26458 bool flag22 = false;
26459 if (mount.Active && mount.Cart)
26460 {
26462 float num18 = ((ignoreWater || merman) ? 1f : (shimmerWet ? 0.25f : (honeyWet ? 0.25f : ((!wet) ? 1f : 0.5f))));
26463 velocity *= num18;
26464 DelegateMethods.Minecart.rotation = fullRotation;
26465 DelegateMethods.Minecart.rotationOrigin = fullRotationOrigin;
26466 BitsByte bitsByte = Minecart.TrackCollision(this, ref position, ref velocity, ref lastBoost, width, height, controlDown, controlUp, fallStart2, trackOnly: false, mount.Delegations);
26467 if (bitsByte[0])
26468 {
26469 onTrack = true;
26470 gfxOffY = Minecart.TrackRotation(this, ref fullRotation, position + velocity, width, height, controlDown, controlUp, mount.Delegations);
26471 fullRotationOrigin = new Vector2((float)(width / 2), (float)height);
26472 }
26473 if (flag21 && !onTrack)
26474 {
26476 }
26477 if (bitsByte[1])
26478 {
26480 {
26481 if (cartFlip)
26482 {
26483 cartFlip = false;
26484 }
26485 else
26486 {
26487 cartFlip = true;
26488 }
26489 }
26490 if (velocity.X > 0f)
26491 {
26492 direction = 1;
26493 }
26494 else if (velocity.X < 0f)
26495 {
26496 direction = -1;
26497 }
26499 }
26500 velocity /= num18;
26501 if (bitsByte[3] && whoAmI == Main.myPlayer)
26502 {
26503 flag22 = true;
26504 }
26505 if (bitsByte[2])
26506 {
26507 cartRampTime = (int)(Math.Abs(velocity.X) / mount.RunSpeed * 20f);
26508 }
26509 if (bitsByte[4])
26510 {
26511 trackBoost -= 4f;
26512 }
26513 if (bitsByte[5])
26514 {
26515 trackBoost += 4f;
26516 }
26517 }
26518 bool flag24 = whoAmI == Main.myPlayer && !mount.Active;
26519 Vector2 vector4 = position;
26520 if (vortexDebuff)
26521 {
26522 velocity.Y = velocity.Y * 0.8f + (float)Math.Cos(base.Center.X % 120f / 120f * ((float)Math.PI * 2f)) * 5f * 0.2f;
26523 }
26525 if (tongued)
26526 {
26527 position += velocity;
26528 flag24 = false;
26529 }
26530 else if (shimmerWet || shimmering)
26531 {
26533 }
26534 else if (honeyWet && !ignoreWater)
26535 {
26537 }
26538 else if (wet && !merman && !ignoreWater && !trident)
26539 {
26541 }
26542 else
26543 {
26546 {
26547 Vector2 vector5 = velocity;
26548 velocity.X = 0f;
26550 velocity.X = vector5.X;
26551 }
26552 if (mount.Active && mount.Type == 43 && velocity.Y != 0f)
26553 {
26554 Vector2 vector6 = velocity;
26555 velocity.X = 0f;
26557 velocity.X = vector6.X;
26558 }
26559 }
26561 TryBouncingBlocks(falling);
26563 if (!shimmering && !tongued)
26564 {
26566 if (!isLockedToATile)
26567 {
26568 Collision.StepConveyorBelt(this, gravDir);
26569 }
26570 }
26571 if (flag24 && velocity.Y == 0f)
26572 {
26574 }
26575 if (flag22)
26576 {
26577 NetMessage.SendData(13, -1, -1, null, whoAmI);
26578 Minecart.HitTrackSwitch(new Vector2(position.X, position.Y), width, height);
26579 }
26580 if (vector3.X != velocity.X)
26581 {
26582 if (vector3.X < 0f)
26583 {
26584 slideDir = -1;
26585 }
26586 else if (vector3.X > 0f)
26587 {
26588 slideDir = 1;
26589 }
26590 }
26591 if (gravDir == 1f && Collision.up)
26592 {
26593 velocity.Y = 0.01f;
26594 if (!merman)
26595 {
26596 jump = 0;
26597 }
26598 }
26599 else if (gravDir == -1f && Collision.down)
26600 {
26601 velocity.Y = -0.01f;
26602 if (!merman)
26603 {
26604 jump = 0;
26605 }
26606 }
26607 if (velocity.Y == 0f && grappling[0] == -1)
26608 {
26609 FloorVisuals(falling);
26610 }
26611 if (whoAmI == Main.myPlayer && !shimmering)
26612 {
26613 Collision.SwitchTiles(position, width, height, oldPosition, 1);
26614 }
26617 numMinions = 0;
26618 slotsMinions = 0f;
26619 if (Main.netMode != 2 && mount.Type != 8)
26620 {
26622 }
26624 PlayerFrame();
26625 if (mount.Type == 8)
26626 {
26627 mount.UseDrill(this);
26628 }
26629 if (statLife > statLifeMax2)
26630 {
26632 }
26633 if (statMana > statManaMax2)
26634 {
26636 }
26637 grappling[0] = -1;
26638 grapCount = 0;
26642 }
26643 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Used when NPCs or pets/minions give gifts or rewards to a player.
static PlayerDeathReason ByOther(int type, int playerIndex=-1)
virtual void OnPlayerUpdate(Player player)
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Definition Entity.cs:57
Vector2 oldPosition
Definition Entity.cs:35
bool honeyWet
Definition Entity.cs:61
bool shimmerWet
Definition Entity.cs:59
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
int oldDirection
Definition Entity.cs:39
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
byte wetCount
Definition Entity.cs:63
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static void HandleSpecialEvent(Player player, int eventID)
static bool ShouldBlockBuilding(Vector2 worldPosition)
Definition DD2Event.cs:853
static void UpdatePlayerPosition(Player player)
static void SmartCursorLookup(Player player)
static Asset< Texture2D > HairStyleBack
static TriggersPack Triggers
static List< string > MouseInModdedUI
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
static readonly SoundStyle Item24
Definition SoundID.cs:725
static readonly SoundStyle Item32
Definition SoundID.cs:741
static readonly SoundStyle Item8
Definition SoundID.cs:693
static readonly SoundStyle Item13
Definition SoundID.cs:703
int headSlot
Definition Item.cs:542
int hammer
The Hammer power of this item. For example, Item.hammer = 70; will appear as 70% Hammer Power in the ...
Definition Item.cs:423
int createWall
The ID of the wall this item places on use. Either a T:Terraria.ID.WallID entry or M:Terraria....
Definition Item.cs:441
int legSlot
Definition Item.cs:546
void TurnToAir(bool fullReset=false)
Definition Item.cs:51791
int axe
The Axe power of this item. The Axe power percentage shown to the user is five times this value,...
Definition Item.cs:416
void SetDefaults(int Type=0)
Definition Item.cs:48800
int bodySlot
Definition Item.cs:544
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345
This serves as the central class from which buff-related functions are supported and carried out.
Definition BuffLoader.cs:18
static readonly List< DamageClass > DamageClasses
static DamageClass Ranged
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
static void UpdateHorizontalSpeeds(Player player)
static void ConsumeAndStopUnavailableJumps(Player player)
static bool WingUpdate(Player player, bool inUse)
If wings can be seen on the player, calls the player's wing's equipment texture's WingUpdate and all ...
This serves as the central class from which item-related functions are carried out....
Definition ItemLoader.cs:26
static void PostUpdateBuffs(Player player)
static void PreUpdateMovement(Player player)
static void PostUpdateRunSpeeds(Player player)
static void PreUpdate(Player player)
static void PostUpdate(Player player)
static void PostUpdateEquips(Player player)
static void SetControls(Player player)
static void PreUpdateBuffs(Player player)
static void PostUpdateMiscEffects(Player player)
This is where all ModPlayer hooks are gathered and called.
Action< Player, Vector2, int, int > MinecartJumpingSound
Definition Mount.cs:88
Action< Player, Vector2, int, int > MinecartBumperSound
Definition Mount.cs:92
bool IsConsideredASlimeMount
Definition Mount.cs:474
void Dismount(Player mountedPlayer)
Definition Mount.cs:6357
float FallDamage
Definition Mount.cs:467
MountDelegatesData Delegations
Definition Mount.cs:510
bool Hover(Player mountedPlayer)
Definition Mount.cs:2980
bool Active
Definition Mount.cs:348
bool BlockExtraJumps
Definition Mount.cs:471
void UpdateEffects(Player mountedPlayer)
Definition Mount.cs:4633
void UpdateDrill(Player mountedPlayer, bool controlUp, bool controlDown)
Definition Mount.cs:2548
float Acceleration
Definition Mount.cs:456
bool CanFly()
Definition Mount.cs:2427
void UseDrill(Player mountedPlayer)
Definition Mount.cs:2571
void FatigueRecovery()
Definition Mount.cs:2526
void AbilityRecovery()
Definition Mount.cs:2503
bool CanHover()
Definition Mount.cs:2440
float RunSpeed
Definition Mount.cs:407
void ResetFlightTime(float xVelocity)
Definition Mount.cs:5363
bool Flight()
Definition Mount.cs:2538
float DashSpeed
Definition Mount.cs:444
int restorationDelayTime
Definition Player.cs:2991
float moveSpeed
The multiplier on this player's F:Terraria.Player.maxRunSpeed and F:Terraria.Player....
Definition Player.cs:2614
void UpdateImmunity()
Definition Player.cs:17208
bool[] buffImmune
Indexed by T:Terraria.ID.BuffID. If true for a given T:Terraria.ID.BuffID, then this player cannot be...
Definition Player.cs:1699
bool controlRight
Definition Player.cs:1896
void UpdateHairDyeDust()
Definition Player.cs:22594
DoorOpeningHelper doorHelper
Definition Player.cs:3017
int _quickGrappleCooldown
Definition Player.cs:3217
void SetTalkNPC(int npcIndex, bool fromNet=false)
Definition Player.cs:4880
bool selectItemOnNextUse
Causes M:Terraria.Player.SmartSelectLookup to run the next time an item animation is finished,...
Definition Player.cs:3326
void CheckDrowning()
Definition Player.cs:21284
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
Definition Player.cs:2092
float maxFallSpeed
Definition Player.cs:2665
void WingAirLogicTweaks()
Definition Player.cs:27111
bool releaseMapFullscreen
Definition Player.cs:1988
void ResetEffects()
Definition Player.cs:16711
bool controlDownHold
Definition Player.cs:1962
bool hasMagiluminescence
Definition Player.cs:2205
bool releaseQuickMana
Definition Player.cs:1936
bool IsVoidVaultEnabled
Definition Player.cs:4239
void HandleHotbar()
Definition Player.cs:29447
void Update_NPCCollision()
Definition Player.cs:29011
OverheadMessage chatOverhead
Definition Player.cs:989
int chest
Represents the chest the player currently has open. If -1, the player has no chest open....
Definition Player.cs:2979
bool runningOnSand
Definition Player.cs:1343
float stepSpeed
Definition Player.cs:1816
SelectionRadial DpadRadial
Definition Player.cs:991
void UpdateMinionTarget()
Definition Player.cs:58049
bool IsStandingStillForSpecialEffects
Definition Player.cs:3677
void HandleBeingInChestRange()
Definition Player.cs:28651
ref StatModifier meleeDamage
Definition Player.cs:3396
void ToggleCreativeMenu()
Definition Player.cs:5390
void TrySyncingInput()
Definition Player.cs:7169
PlayerSleepingHelper sleeping
Definition Player.cs:3011
void UpdateManaRegen()
Definition Player.cs:17767
BitsByte ownedLargeGems
Definition Player.cs:1266
int[] doubleTapCardinalTimer
Definition Player.cs:1556
int _timeSinceLastImmuneGet
Definition Player.cs:1594
void UpdateJumpHeight()
Definition Player.cs:17863
ref float rangedCrit
Definition Player.cs:3392
bool tankPetReset
Definition Player.cs:1077
int statManaMax2
The maximum mana this player can have, adjusted by buffs and equipment.
Definition Player.cs:2122
bool PortalPhysicsEnabled
Definition Player.cs:4370
void UpdateProjectileCaches(int i)
Definition Player.cs:10168
bool downedDD2EventAnyDifficulty
Definition Player.cs:2066
bool tryKeepingHoveringDown
Definition Player.cs:1970
bool empressBrooch
Definition Player.cs:2199
Collision.HurtTile GetHurtTile()
Definition Player.cs:26803
float wallSpeed
Definition Player.cs:2618
SelectionRadial QuicksRadial
Definition Player.cs:995
float pickSpeed
Definition Player.cs:2616
int _framesLeftEligibleForDeadmansChestDeathAchievement
Definition Player.cs:1520
void GamepadEnableGrappleCooldown()
Definition Player.cs:22476
void GetMinecartDamage(float currentSpeed, out int damage, out float knockback)
Definition Player.cs:27049
PlayerSittingHelper sitting
Definition Player.cs:3009
bool forceWerewolf
Definition Player.cs:2535
static float jumpSpeed
The speed, in pixels/tick, that this players jumps at.
Definition Player.cs:2661
bool AnyExtraJumpUsable()
Returns true if any extra jump is P:Terraria.DataStructures.ExtraJumpState.Available and M:Terraria....
Definition Player.cs:58714
void CancelAllJumpVisualEffects()
Definition Player.cs:35648
bool mapAlphaDown
Definition Player.cs:1982
bool ItemTimeIsZero
Definition Player.cs:4402
bool mouseInterface
Definition Player.cs:1616
void QuickBuff()
Definition Player.cs:6086
ref StatModifier GetKnockback(DamageClass damageClass)
Gets the knockback modifier for this damage type on this player. This returns a reference,...
Definition Player.cs:58375
void CapAttackSpeeds()
Definition Player.cs:26875
bool beetleOffense
Definition Player.cs:1095
Item[] armor
The player's armor and accessories. Indexes 0-2 hold head, chest, and legs armor while 10-12 hold the...
Definition Player.cs:1651
void KeyHoldDown(int keyDir, int holdTime)
Definition Player.cs:57928
Vector2 lastBoost
Definition Player.cs:2317
bool ashWoodBonus
Definition Player.cs:1737
static readonly float PhilosopherStoneDurationMultiplier
Definition Player.cs:2583
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
Definition Player.cs:2102
float accRunSpeed
Definition Player.cs:1258
void RocketBootVisuals()
Definition Player.cs:27142
static int GetMouseScrollDelta()
Definition Player.cs:27009
void WallslideMovement()
Definition Player.cs:19745
bool SlimeDontHyperJump
Definition Player.cs:4437
void PurgeDD2EnergyCrystals()
Definition Player.cs:29149
void UpdateMaxTurrets()
Kills F:Terraria.Projectile.sentry projectiles exceeding the players current F:Terraria....
Definition Player.cs:53653
bool creativeGodMode
Definition Player.cs:2046
bool trapDebuffSource
Definition Player.cs:2591
ref StatModifier rangedDamage
Definition Player.cs:3400
int fartKartCloudDelay
Definition Player.cs:1805
void SmartInteractLookup()
Definition Player.cs:15729
float tileSpeed
Definition Player.cs:2620
float runAcceleration
The acceleration, in pixels/ticks^2, that this player experiences while running.
Definition Player.cs:2677
void TryToShimmerUnstuck()
Definition Player.cs:26677
void GrappleMovement()
Definition Player.cs:20439
bool TryingToHoverDown
Definition Player.cs:4275
void LookForTileInteractions()
Definition Player.cs:29675
bool releaseRight
Definition Player.cs:1942
void ApplyTouchDamage(int tileId, int x, int y)
Definition Player.cs:26834
bool CanNPCBeHitByPlayerOrPlayerProjectile(NPC npc, Projectile projectile=null)
Definition Player.cs:19013
bool controlThrow
Definition Player.cs:1908
void UpdatePettingAnimal()
Definition Player.cs:31668
bool vortexStealthActive
Definition Player.cs:2949
int environmentBuffImmunityTimer
Definition Player.cs:1518
void GrabItems(int i)
Definition Player.cs:33598
void ResetVisibleAccessories()
Definition Player.cs:28799
float MountFishronSpecialCounter
Definition Player.cs:3117
float carpetFrameCounter
Definition Player.cs:1313
ref StatModifier allKB
Definition Player.cs:3406
ref float meleeCrit
Definition Player.cs:3388
void HorizontalMovement()
Definition Player.cs:18025
bool HasItem(int type)
Checks if the player has the specified item in their F:Terraria.Player.inventory. Does not check Vo...
Definition Player.cs:56568
bool slowOgreSpit
Definition Player.cs:2597
void ItemCheckWrapped(int i)
Definition Player.cs:29476
int snowBallLauncherInteractionCooldown
Definition Player.cs:1297
int extraFall
The number of extra tiles this player can fall before they start taking fall damage.
Definition Player.cs:2826
bool releaseMapStyle
Definition Player.cs:1990
void WingMovement()
Definition Player.cs:19906
void UpdatePetLight(int i)
Definition Player.cs:15658
bool controlCreativeMenu
Definition Player.cs:1954
void WingFrame(bool wingFlap, bool isCustomWings=false)
Definition Player.cs:27316
void QuickGrapple()
Definition Player.cs:6533
void ResetFloorFlags()
Definition Player.cs:22082
int vanityRocketBoots
Definition Player.cs:2860
void QuickHeal()
Definition Player.cs:5921
void ToggleInv()
Definition Player.cs:5275
void AdjustRemainingPotionSickness()
Definition Player.cs:26788
void ConsumeAllExtraJumps()
Sets the P:Terraria.DataStructures.ExtraJumpState.Available flag for all extra jumps to false....
Definition Player.cs:20817
bool isControlledByFilm
Definition Player.cs:1968
bool witheredWeapon
Definition Player.cs:2595
bool witheredArmor
Definition Player.cs:2593
ref StatModifier magicDamage
Definition Player.cs:3398
bool noFallDmg
If true, this player will take no fall damage.
Definition Player.cs:2869
int shadowDodgeTimer
Definition Player.cs:1406
bool releaseThrow
Definition Player.cs:1934
bool GoingDownWithGrapple
Definition Player.cs:1001
float slotsMinions
The current total value of minions this player has summoned. Used to limit active minions to F:Terrar...
Definition Player.cs:1444
ShimmerUnstuckHelper shimmerUnstuckHelper
Definition Player.cs:2495
float trackBoost
Definition Player.cs:2315
bool vortexDebuff
Definition Player.cs:2589
static int tileTargetY
Definition Player.cs:2652
void TrySpawningFaelings()
Definition Player.cs:15406
void UpdateBuffs(int i)
Definition Player.cs:7901
int wingFrameCounter
Definition Player.cs:1506
int _portalPhysicsTime
Definition Player.cs:3111
bool ShouldFloatInWater
Definition Player.cs:4211
DefenseStat statDefense
The defense value of this player. The Defense wiki pageteaches how player defense affects incoming d...
Definition Player.cs:2075
int starCloakCooldown
Definition Player.cs:1325
void Yoraiz0rEye()
Definition Player.cs:10448
void AdjTiles()
Definition Player.cs:34464
bool CanMoveForwardOnRope(int dir, int x, int y)
Definition Player.cs:22572
void UpdateLifeRegen()
Definition Player.cs:17302
bool tryKeepingHoveringUp
Definition Player.cs:1972
bool mapFullScreen
Definition Player.cs:1984
int rocketSoundDelay
Definition Player.cs:2852
void QuickMount()
Definition Player.cs:6299
float maxRegenDelay
Definition Player.cs:1602
bool ShouldDrawWingsThatAreAlwaysAnimated()
Definition Player.cs:28270
PlayerMovementAccsCache movementAbilitiesCache
Definition Player.cs:3219
void KeyDoubleTap(int keyDir)
Definition Player.cs:57753
Item equippedWings
Definition Player.cs:3320
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Definition Player.cs:2323
void UpdateArmorSets(int i)
Definition Player.cs:13941
void ResetControls()
Definition Player.cs:26903
bool controlTorch
Definition Player.cs:1914
void DoubleJumpVisuals()
Definition Player.cs:19901
void TryToToggleSmartCursor(ref bool smartCursorWanted)
Definition Player.cs:26645
int[] buffTime
The remaining durations in ticks of all buffs this player has active. A value of 0 means that buff ...
Definition Player.cs:1692
bool gravControl2
Definition Player.cs:2959
bool controlMount
Definition Player.cs:1920
int titaniumStormCooldown
Definition Player.cs:1400
void CheckIceBreak()
Definition Player.cs:21517
static int tileRangeX
Definition Player.cs:2642
void CarpetMovement()
Definition Player.cs:19851
bool portalPhysicsFlag
Definition Player.cs:3113
int[] grappling
Definition Player.cs:2840
double Hurt(PlayerDeathReason damageSource, int Damage, int hitDirection, bool pvp, bool quiet, bool Crit, int cooldownCounter, bool dodgeable=true, float armorPenetration=0f)
Definition Player.cs:36998
bool autoReuseAllWeapons
Definition Player.cs:1966
int crystalLeafCooldown
Definition Player.cs:1544
void JumpMovement()
Definition Player.cs:19023
bool controlQuickMana
Definition Player.cs:1950
void DashMovement()
Definition Player.cs:19204
bool hasLucyTheAxe
Definition Player.cs:1552
void SlopingCollision(bool fallThrough, bool ignorePlats)
Definition Player.cs:22001
void WaterCollision(bool fallThrough, bool ignorePlats)
Definition Player.cs:21645
void UpdateArmorLights()
Definition Player.cs:28819
void UpdatePortableStoolUsage()
Definition Player.cs:27014
void HoneyCollision(bool fallThrough, bool ignorePlats)
Definition Player.cs:21612
bool discountEquipped
Definition Player.cs:2793
void ItemCheck_ManageRightClickFeatures()
Definition Player.cs:29229
bool releaseCreativeMenu
Definition Player.cs:1956
static int jumpHeight
Definition Player.cs:2656
void dropItemCheck()
Definition Player.cs:5457
static int tileTargetX
Definition Player.cs:2650
void UpdateTouchingTiles()
Definition Player.cs:58128
static float defaultGravity
Definition Player.cs:2654
void SlopeDownMovement()
Definition Player.cs:21547
bool shroomiteStealth
Definition Player.cs:1735
void StopVanityActions(bool multiplayerBroadcast=true)
Definition Player.cs:31655
float gfxOffY
An offset from the actual position of the player that will be added to the draw position....
Definition Player.cs:1814
int[] buffType
The T:Terraria.ID.BuffIDs of all buffs this player has active. A value of 0 means that buff slot is...
Definition Player.cs:1684
void UpdateDead()
Definition Player.cs:15469
void CheckCrackedBrickBreak()
Definition Player.cs:21399
bool controlQuickHeal
Definition Player.cs:1952
bool ZoneSandstorm
Definition Player.cs:4044
bool isOperatingAnotherEntity
Definition Player.cs:1964
int timeSinceLastDashStarted
The amount of time that has passed, in ticks, since this player last performed a dash.
Definition Player.cs:1245
float lifeSteal
Definition Player.cs:1183
void UpdateLuck()
Definition Player.cs:26892
float manaSickReduction
Definition Player.cs:1167
float maxRunSpeed
The maximum speed, in pixels/tick, that this player can reach by just running.
Definition Player.cs:2671
void UpdatePermanentBoosters()
Definition Player.cs:10916
void UpdatePet(int i)
Definition Player.cs:15644
bool rocketRelease
Definition Player.cs:2854
bool shimmerImmune
Definition Player.cs:2158
float runSlowdown
Definition Player.cs:2679
ref StatModifier allDamage
Definition Player.cs:3394
void UpdateReleaseUseTile()
Definition Player.cs:27035
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....
Definition Player.cs:5700
static int tileRangeY
Definition Player.cs:2644
void UpdateControlHolds()
Definition Player.cs:26929
Vector2 instantMovementAccumulatedThisFrame
Definition Player.cs:2735
void ResetProjectileCaches()
Definition Player.cs:10201
PlayerEyeHelper eyeHelper
Definition Player.cs:3013
void TryBouncingBlocks(bool Falling)
Definition Player.cs:33502
void DryCollision(bool fallThrough, bool ignorePlats)
Definition Player.cs:21728
void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit=false, DamageClass? damageType=null, bool damageVariation=false)
Deals damage to an NPC (and syncs the hit in multiplayer). The damage will be affected by modifiers...
Definition Player.cs:18941
void WOFTongue()
Definition Player.cs:20168
void TryOpeningFullscreenMap()
Definition Player.cs:26952
void QuickMana()
Definition Player.cs:6010
bool isLockedToATile
Definition Player.cs:4358
void FloorVisuals(bool Falling)
Definition Player.cs:22043
int potionDelayTime
Definition Player.cs:2989
bool releaseSmart
Definition Player.cs:1944
void UpdateDyes()
Definition Player.cs:7641
void UpdateSocialShadow()
Definition Player.cs:14598
bool releaseQuickHeal
Definition Player.cs:1938
static int maxBuffs
Definition Player.cs:3380
float pulleyFrameCounter
Definition Player.cs:1289
bool TryingToHoverUp
Definition Player.cs:4263
SelectionRadial CircularRadial
Definition Player.cs:993
void TryLandingOnDetonator()
Definition Player.cs:33477
void FindPulley()
Definition Player.cs:17915
void ShimmerCollision(bool fallThrough, bool ignorePlats, bool noCollision)
Definition Player.cs:21573
bool releaseInventory
Definition Player.cs:1930
void WingAirVisuals()
Definition Player.cs:28279
float fullRotation
Definition Player.cs:1801
int[] hurtCooldowns
Definition Player.cs:3259
void UpdateMiscCounter()
Definition Player.cs:27102
void TryPortalJumping()
Definition Player.cs:57723
bool behindBackWall
Definition Player.cs:3151
DirectionalInputSyncCache LocalInputCache
Definition Player.cs:1892
bool delayUseItem
Definition Player.cs:1996
void UpdateNearbyInteractibleProjectilesList()
Definition Player.cs:21086
void UpdateBiomes()
Definition Player.cs:14801
void BordersMovement()
Definition Player.cs:22394
bool onWrongGround
Definition Player.cs:2307
void ResizeHitbox()
Definition Player.cs:27028
int statMana
The current mana of this player. Capped at F:Terraria.Player.statManaMax2. If you increase this val...
Definition Player.cs:2111
void UpdateAdvancedShadows()
Definition Player.cs:4843
bool releaseMount
Definition Player.cs:1946
void StickyMovement()
Definition Player.cs:20822
void DelBuff(int b)
Removes the buff at the provided index in F:Terraria.Player.buffType and F:Terraria....
Definition Player.cs:5868
int[] ownedProjectileCounts
Provides efficient access to the number of projectiles of the specified type owned by this player cur...
Definition Player.cs:3105
void UpdateEquips(int i)
Definition Player.cs:10957
void UpdateTeleportVisuals()
Definition Player.cs:14640
int[] holdDownCardinalTimer
Definition Player.cs:1558
Vector2 fullRotationOrigin
Definition Player.cs:1803
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
Definition Player.cs:1767
bool controlUseTile
Definition Player.cs:1906
bool beetleDefense
Definition Player.cs:1093
bool controlUseItem
Definition Player.cs:1904
void PlayerFrame()
Definition Player.cs:34633
bool MountFishronSpecial
Definition Player.cs:4382
void RefreshDoubleJumps()
Definition Player.cs:20798
float GetTotalCritChance(DamageClass damageClass)
Definition Player.cs:58415
int numMinions
The current number of minions this player has summoned. Note that F:Terraria.Player....
Definition Player.cs:1438
int mushroomDelayTime
Definition Player.cs:2993
bool controlSmart
Definition Player.cs:1918
bool discountAvailable
Definition Player.cs:2795
bool shieldRaised
Definition Player.cs:3233
bool arcticDivingGear
Definition Player.cs:2299
PlayerInteractionAnchor tileEntityAnchor
Definition Player.cs:3015
void ClearBuff(int type)
Removes the provided buff type from the player and shuffles the remaining buff indexes down to fill t...
Definition Player.cs:5893
static bool DisableLeftShiftTrashCan
Definition ItemSlot.cs:26

References Terraria.Player._framesLeftEligibleForDeadmansChestDeathAchievement, Terraria.Player._portalPhysicsTime, Terraria.Player._quickGrappleCooldown, Terraria.Player._timeSinceLastImmuneGet, Terraria.Mount.AbilityRecovery(), Terraria.Mount.Acceleration, Terraria.Player.accFlipper, Terraria.Player.accMerman, Terraria.Player.accRunSpeed, Terraria.Mount.Active, Terraria.Player.AddBuff(), Terraria.Lighting.AddLight(), Terraria.Player.AdjTiles(), Terraria.Player.AdjustRemainingPotionSickness(), Terraria.Player.afkCounter, Terraria.Player.aggro, Terraria.Player.allDamage, Terraria.Player.allKB, Terraria.Player.AnyExtraJumpUsable(), Terraria.Player.ApplyDamageToNPC(), Terraria.Player.ApplyTouchDamage(), Terraria.Player.arcticDivingGear, Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Player.armor, Terraria.Player.ashWoodBonus, Terraria.Player.attackCD, Terraria.Player.autoJump, Terraria.Player.autoReuseAllWeapons, Terraria.Item.axe, Terraria.Player.beetleDefense, Terraria.Player.beetleOffense, Terraria.Player.behindBackWall, Terraria.NPC.BigMimicSummonCheck(), Terraria.Mount.BlockExtraJumps, Terraria.Main.blockInput, Terraria.Player.body, Terraria.Item.bodySlot, Terraria.Player.boneGloveTimer, Terraria.Player.BordersMovement(), Terraria.NPC.brainOfGravity, Terraria.Player.brokenArmor, Terraria.ModLoader.BuffLoader.BuffCount, Terraria.Player.buffImmune, Terraria.Player.buffTime, Terraria.Player.buffType, Terraria.DataStructures.PlayerDeathReason.ByOther(), Terraria.Main.cameraX, Terraria.Player.canCarpet, Terraria.Player.CancelAllJumpVisualEffects(), Terraria.Mount.CanFly(), Terraria.Mount.CanHover(), Terraria.Player.CanMoveForwardOnRope(), Terraria.Player.CanNPCBeHitByPlayerOrPlayerProjectile(), Terraria.Player.canRocket, Terraria.Player.CapAttackSpeeds(), Terraria.Player.carpet, Terraria.Player.carpetFrame, Terraria.Player.carpetFrameCounter, Terraria.Player.CarpetMovement(), Terraria.Player.carpetTime, Terraria.Mount.Cart, Terraria.Player.cartFlip, Terraria.Player.cartRampTime, Terraria.Player.SelectionRadial.ChangeSelection(), Terraria.Player.chatOverhead, Terraria.Player.CheckCrackedBrickBreak(), Terraria.Player.CheckDrowning(), Terraria.Player.CheckIceBreak(), Terraria.Main.chest, Terraria.Player.chest, Terraria.Player.chilled, Terraria.Player.CircularRadial, Terraria.Player.ClearBuff(), Terraria.Player.confused, Terraria.Player.ConsumeAllExtraJumps(), Terraria.ModLoader.ExtraJumpLoader.ConsumeAndStopUnavailableJumps(), Terraria.Player.controlCreativeMenu, Terraria.Player.controlDown, Terraria.Player.controlDownHold, Terraria.Player.controlHook, Terraria.Player.controlInv, Terraria.Player.controlJump, Terraria.Player.controlLeft, Terraria.Player.controlMount, Terraria.Player.controlQuickHeal, Terraria.Player.controlQuickMana, Terraria.Player.controlRight, Terraria.Player.controlSmart, Terraria.Player.controlThrow, Terraria.Player.controlTorch, Terraria.Player.controlUp, Terraria.Player.controlUseItem, Terraria.Player.controlUseTile, Terraria.DataStructures.PlayerMovementAccsCache.CopyFrom(), Terraria.Item.createWall, Terraria.Player.creativeGodMode, Terraria.Player.crystalLeafCooldown, Terraria.GameInput.PlayerInput.SettingsForUI.CurrentCursorMode, Terraria.Player.cWings, Terraria.ModLoader.DamageClassLoader.DamageClasses, Terraria.Player.DashMovement(), Terraria.Mount.DashSpeed, Terraria.Main.dayTime, Terraria.Player.dazed, Terraria.Player.dead, Terraria.Player.defaultGravity, Terraria.Player.delayUseItem, Terraria.Player.DelBuff(), Terraria.Mount.Delegations, Terraria.Player.desertBoots, Terraria.Entity.direction, Terraria.UI.ItemSlot.Options.DisableLeftShiftTrashCan, Terraria.Player.discountAvailable, Terraria.Player.discountEquipped, Terraria.Mount.Dismount(), Terraria.Main.dontStarveWorld, Terraria.Player.doorHelper, Terraria.Player.DoubleJumpVisuals(), Terraria.Player.doubleTapCardinalTimer, Terraria.Collision.down, Terraria.Player.downedDD2EventAnyDifficulty, Terraria.GameContent.Events.DD2Event.DownedInvasionAnyDifficulty, Terraria.Player.DpadRadial, Terraria.Main.drawingPlayerChat, Terraria.Player.dropItemCheck(), Terraria.Player.DryCollision(), Terraria.Main.dust, Terraria.Dust.dustWater(), Terraria.Main.editChest, Terraria.Main.editSign, Terraria.Player.emoteTime, Terraria.Player.empressBrooch, Terraria.Player.environmentBuffImmunityTimer, Terraria.Player.equippedWings, Terraria.Main.expertMode, Terraria.Player.extraFall, Terraria.Player.eyeHelper, Terraria.Mount.FallDamage, Terraria.Player.fallStart, Terraria.Player.fallStart2, Terraria.Player.fartKartCloudDelay, Terraria.Mount.FatigueRecovery(), Terraria.GameContent.Events.DD2Event.FindArenaHitbox(), Terraria.Player.FindPulley(), Terraria.Player.flapSound, Terraria.Mount.Flight(), Terraria.Player.FloorVisuals(), Terraria.Main.focusRecipe, Terraria.Player.forcedGravity, Terraria.Player.forceMerman, Terraria.Player.forceWerewolf, Terraria.NPC.freeCake, Terraria.Player.frozen, Terraria.Player.fullRotation, Terraria.Player.fullRotationOrigin, Terraria.Main.GameModeInfo, Terraria.Player.GamepadEnableGrappleCooldown(), Terraria.Projectile.GasTrapCheck(), Terraria.Player.gem, Terraria.Player.gemCount, Terraria.Player.GetHurtTile(), Terraria.Player.GetKnockback(), Terraria.Player.GetMinecartDamage(), Terraria.Player.GetMouseScrollDelta(), Terraria.DataStructures.PlayerInteractionAnchor.GetTileEntity(), Terraria.Player.GetTotalCritChance(), Terraria.Player.gfxOffY, Terraria.Player.ghost, Terraria.Player.Ghost(), Terraria.Player.ghostDmg, Terraria.Player.GoingDownWithGrapple, Terraria.Player.GrabItems(), Terraria.Player.grapCount, Terraria.Player.GrappleMovement(), Terraria.Player.grappling, Terraria.Player.gravControl, Terraria.Player.gravControl2, Terraria.Player.gravDir, Terraria.Player.gravity, Terraria.GameContent.TextureAssets.HairStyleBack, Terraria.Main.hairWindow, Terraria.Item.hammer, Terraria.Player.HandleBeingInChestRange(), Terraria.Player.HandleHotbar(), Terraria.GameContent.Achievements.AchievementsHelper.HandleRunning(), Terraria.GameContent.Achievements.AchievementsHelper.HandleSpecialEvent(), Terraria.Main.hasFocus, Terraria.Player.HasItem(), Terraria.Player.hasLucyTheAxe, Terraria.Player.hasMagiluminescence, Terraria.Player.head, Terraria.Item.headSlot, Terraria.Entity.height, Terraria.Player.heldProj, Terraria.Player.hideMerman, Terraria.Player.hideWolf, Terraria.Minecart.HitTrackSwitch(), Terraria.Player.holdDownCardinalTimer, Terraria.Collision.honey, Terraria.Player.HoneyCollision(), Terraria.Entity.honeyWet, Terraria.Player.HorizontalMovement(), Terraria.GameInput.PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed, Terraria.Mount.Hover(), Terraria.Player.Settings.HoverControl, Terraria.Player.Hurt(), Terraria.Player.hurtCooldowns, Terraria.Player.iceSkate, Terraria.Player.ignoreWater, Terraria.Player.immune, Terraria.Player.infernoCounter, Terraria.Main.InputTextChest(), Terraria.Main.InputTextSign(), Terraria.GameContent.Creative.CreativePowerManager.Instance, Terraria.Graphics.Capture.CaptureManager.Instance, Terraria.Main.instance, Terraria.Player.instantMovementAccumulatedThisFrame, Terraria.DataStructures.PlayerInteractionAnchor.InUse, Terraria.Player.inventory, Terraria.Player.invis, Terraria.Mount.IsConsideredASlimeMount, Terraria.Player.isControlledByFilm, Terraria.GameContent.Creative.CreativePowers.APerPlayerTogglePower.IsEnabledForPlayer(), Terraria.Player.isLockedToATile, Terraria.Player.isOperatingAnotherEntity, Terraria.WorldGen.IsRope(), Terraria.Player.IsStandingStillForSpecialEffects, Terraria.Player.IsVoidVaultEnabled, Terraria.ID.SoundID.Item13, Terraria.ID.SoundID.Item24, Terraria.ID.SoundID.Item32, Terraria.ID.SoundID.Item8, Terraria.Player.itemAnimation, Terraria.Player.ItemCheck_ManageRightClickFeatures(), Terraria.Player.ItemCheckWrapped(), Terraria.Player.ItemTimeIsZero, Terraria.Player.jump, Terraria.Player.jumpHeight, Terraria.Player.JumpMovement(), Terraria.Player.jumpSpeed, Terraria.Player.justJumped, Terraria.Player.kbBuff, Terraria.Player.KeyDoubleTap(), Terraria.Player.KeyHoldDown(), Terraria.Main.keyState, Terraria.Player.lastBoost, Terraria.Player.lastChest, Terraria.Player.lastStoned, Terraria.Player.lastTileRangeX, Terraria.Player.lastTileRangeY, Terraria.Collision.LavaCollision(), Terraria.Player.lavaImmune, Terraria.Player.lavaMax, Terraria.Player.lavaRose, Terraria.Player.lavaTime, Terraria.Entity.lavaWet, Terraria.Player.leftTimer, Terraria.Player.legs, Terraria.Item.legSlot, Terraria.Player.lifeSteal, Terraria.Player.LocalInputCache, Terraria.Player.LookForTileInteractions(), Terraria.Player.magicDamage, Terraria.Player.manaRegenCount, Terraria.Player.manaSick, Terraria.Player.manaSickReduction, Terraria.Player.mapAlphaDown, Terraria.Player.mapAlphaUp, Terraria.Main.mapFullscreen, Terraria.Player.mapFullScreen, Terraria.Main.mapFullscreenScale, Terraria.Main.mapStyle, Terraria.Player.mapStyle, Terraria.Player.mapZoomIn, Terraria.Player.mapZoomOut, Terraria.Player.maxBuffs, Terraria.Player.maxFallSpeed, Terraria.Player.maxRegenDelay, Terraria.Player.maxRunSpeed, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Player.maxTurrets, Terraria.Player.maxTurretsOld, Terraria.ModLoader.DamageClass.Melee, Terraria.Player.meleeCrit, Terraria.Player.meleeDamage, Terraria.Player.merman, Terraria.Mount.MountDelegatesData.MinecartBumperSound, Terraria.Mount.MountDelegatesData.MinecartJumpingSound, Terraria.Player.mount, Terraria.Player.MountFishronSpecial, Terraria.Player.MountFishronSpecialCounter, Terraria.GameInput.PlayerInput.MouseInModdedUI, Terraria.Player.mouseInterface, Terraria.Main.MouseScreen, Terraria.Main.mouseY, Terraria.Player.movementAbilitiesCache, Terraria.Player.moveSpeed, Terraria.Item.mushroomDelay, Terraria.Player.mushroomDelayTime, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), Terraria.Item.NewItem(), Terraria.Player.noBuilding, Terraria.Player.noFallDmg, Terraria.Player.nonTorch, Terraria.Main.npc, Terraria.Main.npcShop, Terraria.Main.numAvailableRecipes, Terraria.Player.numMinions, Terraria.TileObject.objectPreview, Terraria.Entity.oldDirection, Terraria.Entity.oldPosition, Terraria.Player.onFire, Terraria.Player.onFire3, Terraria.GameContent.Events.DD2Event.Ongoing, Terraria.Player.onHitDodge, Terraria.DataStructures.TileEntity.OnPlayerUpdate(), Terraria.Minecart.OnTrack(), Terraria.Player.onTrack, Terraria.Player.onWrongGround, Terraria.Player.outOfRange, Terraria.Player.ownedLargeGems, Terraria.Player.ownedProjectileCounts, Terraria.DataStructures.PlayerMovementAccsCache.PasteInto(), Terraria.Player.petalTimer, Terraria.Player.PhilosopherStoneDurationMultiplier, Terraria.Player.pickSpeed, Terraria.Main.player, Terraria.Player.PlayerFrame(), Terraria.Main.playerInventory, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Player.poisoned, Terraria.Player.PortalPhysicsEnabled, Terraria.Player.portalPhysicsFlag, Terraria.Entity.position, Terraria.ModLoader.PlayerLoader.PostUpdate(), Terraria.ModLoader.PlayerLoader.PostUpdateBuffs(), Terraria.ModLoader.PlayerLoader.PostUpdateEquips(), Terraria.ModLoader.PlayerLoader.PostUpdateMiscEffects(), Terraria.ModLoader.PlayerLoader.PostUpdateRunSpeeds(), Terraria.Item.potionDelay, Terraria.Player.potionDelay, Terraria.Player.potionDelayTime, Terraria.Player.powerrun, Terraria.ModLoader.PlayerLoader.PreUpdate(), Terraria.ModLoader.PlayerLoader.PreUpdateBuffs(), Terraria.ModLoader.PlayerLoader.PreUpdateMovement(), Terraria.Player.pStone, Terraria.Player.pulley, Terraria.Player.pulleyDir, Terraria.Player.pulleyFrame, Terraria.Player.pulleyFrameCounter, Terraria.Player.PurgeDD2EnergyCrystals(), Terraria.Player.QuickBuff(), Terraria.Player.QuickGrapple(), Terraria.Player.QuickHeal(), Terraria.Player.QuickMana(), Terraria.Player.QuickMount(), Terraria.Player.QuicksRadial, Terraria.Main.rand, Terraria.ModLoader.DamageClass.Ranged, Terraria.Player.rangedCrit, Terraria.Player.rangedDamage, Terraria.Main.recBigList, Terraria.Main.recStart, Terraria.Player.RefreshDoubleJumps(), Terraria.Player.releaseCreativeMenu, Terraria.Player.releaseDown, Terraria.Player.releaseHook, Terraria.Player.releaseInventory, Terraria.Player.releaseJump, Terraria.Player.releaseLeft, Terraria.Player.releaseMapFullscreen, Terraria.Player.releaseMapStyle, Terraria.Player.releaseMount, Terraria.Player.releaseQuickHeal, Terraria.Player.releaseQuickMana, Terraria.Player.releaseRight, Terraria.Player.releaseSmart, Terraria.Player.releaseThrow, Terraria.Player.releaseUp, Terraria.Main.remixWorld, Terraria.Player.ResetControls(), Terraria.Player.ResetEffects(), Terraria.Mount.ResetFlightTime(), Terraria.Player.ResetFloorFlags(), Terraria.Player.ResetProjectileCaches(), Terraria.Player.ResetVisibleAccessories(), Terraria.Player.ResizeHitbox(), Terraria.Item.restorationDelay, Terraria.Player.restorationDelayTime, Terraria.Player.reuseDelay, Terraria.Player.rightTimer, Terraria.Player.rocketBoots, Terraria.Player.RocketBootVisuals(), Terraria.Player.rocketDelay, Terraria.Player.rocketDelay2, Terraria.Player.rocketFrame, Terraria.Player.rocketRelease, Terraria.Player.rocketSoundDelay, Terraria.Player.rocketTime, Terraria.Player.rocketTimeMax, Terraria.Player.ropeCount, Terraria.Player.runAcceleration, Terraria.Player.runningOnSand, Terraria.Player.runSlowdown, Terraria.Player.runSoundDelay, Terraria.Mount.RunSpeed, Terraria.Player.sandStorm, Terraria.Main.SceneMetrics, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.sectionManager, Terraria.Player.SelectionRadial.SelectedBinding, Terraria.Player.selectedItem, Terraria.Player.selectItemOnNextUse, Terraria.NetMessage.SendData(), Terraria.ModLoader.PlayerLoader.SetControls(), Terraria.Item.SetDefaults(), Terraria.Player.setSolar, Terraria.Player.SetTalkNPC(), Terraria.Main.SettingsEnabled_AutoReuseAllItems, Terraria.Player.setVortex, Terraria.GameInput.PlayerInput.SetZoom_UI(), Terraria.GameInput.PlayerInput.SetZoom_World(), Terraria.Player.shadowArmor, Terraria.Player.shadowDodge, Terraria.Player.shadowDodgeTimer, Terraria.Player.shieldRaised, Terraria.Collision.shimmer, Terraria.Player.ShimmerCollision(), Terraria.Player.shimmerImmune, Terraria.Player.shimmering, Terraria.Player.shimmerUnstuckHelper, Terraria.Entity.shimmerWet, Terraria.GameContent.Events.DD2Event.ShouldBlockBuilding(), Terraria.Player.ShouldDrawWingsThatAreAlwaysAnimated(), Terraria.Player.ShouldFloatInWater, Terraria.GameContent.ShimmerUnstuckHelper.ShouldUnstuck, Terraria.Player.shroomiteStealth, Terraria.Main.sign, Terraria.Player.sign, Terraria.Player.sitting, Terraria.Player.sleeping, Terraria.Player.slideDir, Terraria.Player.sliding, Terraria.Player.SlimeDontHyperJump, Terraria.Player.slippy, Terraria.Player.slippy2, Terraria.Player.SlopeDownMovement(), Terraria.Player.SlopingCollision(), Terraria.Player.slotsMinions, Terraria.Player.slow, Terraria.Player.slowFall, Terraria.Player.slowOgreSpit, Terraria.GameContent.SmartCursorHelper.SmartCursorLookup(), Terraria.Main.SmartCursorWanted_GamePad, Terraria.Main.SmartCursorWanted_Mouse, Terraria.Player.SmartInteractLookup(), Terraria.Player.snowBallLauncherInteractionCooldown, Terraria.Collision.SolidCollision(), Terraria.Player.soulDrain, Terraria.Player.starCloakCooldown, Terraria.Player.statDefense, Terraria.Player.statLife, Terraria.Player.statLifeMax2, Terraria.Player.statMana, Terraria.Player.statManaMax2, Terraria.Player.stealth, Terraria.Player.stealthTimer, Terraria.GameInput.PlayerInput.SteamDeckIsUsed, Terraria.Collision.StepConveyorBelt(), Terraria.Collision.StepDown(), Terraria.Player.stepSpeed, Terraria.Collision.StepUp(), Terraria.Player.sticky, Terraria.Player.StickyMovement(), Terraria.Player.stoned, Terraria.Player.StopVanityActions(), Terraria.Collision.SwitchTiles(), Terraria.Player.talkNPC, Terraria.Player.tankPet, Terraria.Player.tankPetReset, Terraria.Main.tile, Terraria.Player.tileEntityAnchor, Terraria.Player.tileRangeX, Terraria.Player.tileRangeY, Terraria.Player.tileSpeed, Terraria.Player.tileTargetX, Terraria.Player.tileTargetY, Terraria.Player.OverheadMessage.timeLeft, Terraria.Player.timeSinceLastDashStarted, Terraria.Player.titaniumStormCooldown, Terraria.Player.ToggleCreativeMenu(), Terraria.Player.ToggleInv(), Terraria.Player.tongued, Terraria.Player.trackBoost, Terraria.Minecart.TrackCollision(), Terraria.Minecart.TrackRotation(), Terraria.Player.trapDebuffSource, Terraria.Player.trashItem, Terraria.Player.trident, Terraria.GameInput.PlayerInput.Triggers, Terraria.Player.TryBouncingBlocks(), Terraria.Player.TryingToHoverDown, Terraria.Player.TryingToHoverUp, Terraria.Player.tryKeepingHoveringDown, Terraria.Player.tryKeepingHoveringUp, Terraria.Player.TryLandingOnDetonator(), Terraria.Player.TryOpeningFullscreenMap(), Terraria.GameContent.LucyAxeMessage.TryPlayingIdleMessage(), Terraria.Player.TryPortalJumping(), Terraria.Player.TrySpawningFaelings(), Terraria.Player.TrySyncingInput(), Terraria.Player.TryToShimmerUnstuck(), Terraria.Player.TryToToggleSmartCursor(), Terraria.Item.TurnToAir(), Terraria.Item.type, Terraria.Mount.Type, Terraria.Main.UnderworldLayer, Terraria.Collision.up, Terraria.GameInput.LockOnHelper.Update(), Terraria.Player.SelectionRadial.Update(), Terraria.GameContent.DontStarveDarknessDamageDealer.Update(), Terraria.GameContent.DoorOpeningHelper.Update(), Terraria.GameContent.PlayerEyeHelper.Update(), Terraria.GameContent.ShimmerUnstuckHelper.Update(), Terraria.Player.Update_NPCCollision(), Terraria.Player.UpdateAdvancedShadows(), Terraria.Player.UpdateArmorLights(), Terraria.Player.UpdateArmorSets(), Terraria.Player.UpdateBiomes(), Terraria.Player.UpdateBuffs(), Terraria.Player.UpdateControlHolds(), Terraria.Player.UpdateDead(), Terraria.Mount.UpdateDrill(), Terraria.Player.UpdateDyes(), Terraria.Mount.UpdateEffects(), Terraria.Player.UpdateEquips(), Terraria.Player.UpdateHairDyeDust(), Terraria.ModLoader.ExtraJumpLoader.UpdateHorizontalSpeeds(), Terraria.Player.UpdateImmunity(), Terraria.Player.UpdateJumpHeight(), Terraria.Player.UpdateLifeRegen(), Terraria.Player.UpdateLuck(), Terraria.Player.UpdateManaRegen(), Terraria.Player.UpdateMaxTurrets(), Terraria.Player.UpdateMinionTarget(), Terraria.Player.UpdateMiscCounter(), Terraria.Player.UpdateNearbyInteractibleProjectilesList(), Terraria.Player.UpdatePermanentBoosters(), Terraria.Player.UpdatePet(), Terraria.Player.UpdatePetLight(), Terraria.Player.UpdatePettingAnimal(), Terraria.GameContent.PressurePlateHelper.UpdatePlayerPosition(), Terraria.Player.UpdatePortableStoolUsage(), Terraria.Player.UpdateProjectileCaches(), Terraria.Player.UpdateReleaseUseTile(), Terraria.GameContent.PlayerSittingHelper.UpdateSitting(), Terraria.Player.UpdateSocialShadow(), Terraria.GameContent.PlayerSleepingHelper.UpdateState(), Terraria.Player.UpdateTeleportVisuals(), Terraria.Player.UpdateTouchingTiles(), Terraria.Mount.UseDrill(), Terraria.GameInput.PlayerInput.UsingGamepad, Terraria.Player.vanityRocketBoots, Terraria.Entity.velocity, Terraria.Player.vortexDebuff, Terraria.Player.vortexStealthActive, Terraria.Player.WallslideMovement(), Terraria.Player.wallSpeed, Terraria.Player.WaterCollision(), Terraria.Player.waterWalk, Terraria.Player.waterWalk2, Terraria.Player.webbed, Terraria.Player.wereWolf, Terraria.Entity.wet, Terraria.Collision.WetCollision(), Terraria.Entity.wetCount, Terraria.Player.wetSlime, Terraria.Entity.whoAmI, Terraria.Entity.width, Terraria.Player.WingAirLogicTweaks(), Terraria.Player.WingAirVisuals(), Terraria.Player.wingFrame, Terraria.Player.WingFrame(), Terraria.Player.wingFrameCounter, Terraria.Player.WingMovement(), Terraria.Player.wings, Terraria.Player.wingsLogic, Terraria.Player.wingTime, Terraria.Player.wingTimeMax, Terraria.ModLoader.ItemLoader.WingUpdate(), Terraria.Player.witheredArmor, Terraria.Player.witheredWeapon, Terraria.Main.wofNPCIndex, Terraria.Player.WOFTongue(), Terraria.Player.wolfAcc, Terraria.Player.yoraiz0rEye, Terraria.Player.Yoraiz0rEye(), Terraria.Player.ZoneSandstorm, and Terraria.Player.ZoneSnow.