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

◆ AI_016()

void Terraria.Projectile.AI_016 ( )
inlineprivate

Definition at line 49783 of file Projectile.cs.

49784 {
49785 //IL_05e0: Unknown result type (might be due to invalid IL or missing references)
49786 //IL_05e5: Unknown result type (might be due to invalid IL or missing references)
49787 //IL_05ea: Unknown result type (might be due to invalid IL or missing references)
49788 //IL_05ec: Unknown result type (might be due to invalid IL or missing references)
49789 //IL_05f3: Unknown result type (might be due to invalid IL or missing references)
49790 //IL_018d: Unknown result type (might be due to invalid IL or missing references)
49791 //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
49792 //IL_0672: Unknown result type (might be due to invalid IL or missing references)
49793 //IL_0677: Unknown result type (might be due to invalid IL or missing references)
49794 //IL_067c: Unknown result type (might be due to invalid IL or missing references)
49795 //IL_0689: Unknown result type (might be due to invalid IL or missing references)
49796 //IL_068e: Unknown result type (might be due to invalid IL or missing references)
49797 //IL_06e4: Unknown result type (might be due to invalid IL or missing references)
49798 //IL_06e9: Unknown result type (might be due to invalid IL or missing references)
49799 //IL_0606: Unknown result type (might be due to invalid IL or missing references)
49800 //IL_0612: Unknown result type (might be due to invalid IL or missing references)
49801 //IL_0618: Unknown result type (might be due to invalid IL or missing references)
49802 //IL_061d: Unknown result type (might be due to invalid IL or missing references)
49803 //IL_0622: Unknown result type (might be due to invalid IL or missing references)
49804 //IL_0626: Unknown result type (might be due to invalid IL or missing references)
49805 //IL_062b: Unknown result type (might be due to invalid IL or missing references)
49806 //IL_062d: Unknown result type (might be due to invalid IL or missing references)
49807 //IL_0632: Unknown result type (might be due to invalid IL or missing references)
49808 //IL_063c: Unknown result type (might be due to invalid IL or missing references)
49809 //IL_0641: Unknown result type (might be due to invalid IL or missing references)
49810 //IL_06fc: Unknown result type (might be due to invalid IL or missing references)
49811 //IL_0701: Unknown result type (might be due to invalid IL or missing references)
49812 //IL_0708: Unknown result type (might be due to invalid IL or missing references)
49813 //IL_070d: Unknown result type (might be due to invalid IL or missing references)
49814 //IL_0714: Unknown result type (might be due to invalid IL or missing references)
49815 //IL_071b: Unknown result type (might be due to invalid IL or missing references)
49816 //IL_072f: Unknown result type (might be due to invalid IL or missing references)
49817 //IL_0734: Unknown result type (might be due to invalid IL or missing references)
49818 //IL_0741: Unknown result type (might be due to invalid IL or missing references)
49819 //IL_0747: Unknown result type (might be due to invalid IL or missing references)
49820 //IL_07aa: Unknown result type (might be due to invalid IL or missing references)
49821 //IL_07af: Unknown result type (might be due to invalid IL or missing references)
49822 //IL_07b2: Unknown result type (might be due to invalid IL or missing references)
49823 //IL_07b7: Unknown result type (might be due to invalid IL or missing references)
49824 //IL_07be: Unknown result type (might be due to invalid IL or missing references)
49825 //IL_07c3: Unknown result type (might be due to invalid IL or missing references)
49826 //IL_07ca: Unknown result type (might be due to invalid IL or missing references)
49827 //IL_07cc: Unknown result type (might be due to invalid IL or missing references)
49828 //IL_07d6: Unknown result type (might be due to invalid IL or missing references)
49829 //IL_07e3: Unknown result type (might be due to invalid IL or missing references)
49830 //IL_07e9: Unknown result type (might be due to invalid IL or missing references)
49831 //IL_076d: Unknown result type (might be due to invalid IL or missing references)
49832 //IL_0777: Unknown result type (might be due to invalid IL or missing references)
49833 //IL_077c: Unknown result type (might be due to invalid IL or missing references)
49834 //IL_080d: Unknown result type (might be due to invalid IL or missing references)
49835 //IL_0812: Unknown result type (might be due to invalid IL or missing references)
49836 //IL_0819: Unknown result type (might be due to invalid IL or missing references)
49837 //IL_081e: Unknown result type (might be due to invalid IL or missing references)
49838 //IL_0825: Unknown result type (might be due to invalid IL or missing references)
49839 //IL_082c: Unknown result type (might be due to invalid IL or missing references)
49840 //IL_0840: Unknown result type (might be due to invalid IL or missing references)
49841 //IL_0845: Unknown result type (might be due to invalid IL or missing references)
49842 //IL_0852: Unknown result type (might be due to invalid IL or missing references)
49843 //IL_0858: Unknown result type (might be due to invalid IL or missing references)
49844 //IL_087e: Unknown result type (might be due to invalid IL or missing references)
49845 //IL_0888: Unknown result type (might be due to invalid IL or missing references)
49846 //IL_088d: Unknown result type (might be due to invalid IL or missing references)
49847 //IL_0bd6: Unknown result type (might be due to invalid IL or missing references)
49848 //IL_03b2: Unknown result type (might be due to invalid IL or missing references)
49849 //IL_028a: Unknown result type (might be due to invalid IL or missing references)
49850 //IL_0297: Unknown result type (might be due to invalid IL or missing references)
49851 //IL_029c: Unknown result type (might be due to invalid IL or missing references)
49852 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)
49853 //IL_08ee: Unknown result type (might be due to invalid IL or missing references)
49854 //IL_08f3: Unknown result type (might be due to invalid IL or missing references)
49855 //IL_08f5: Unknown result type (might be due to invalid IL or missing references)
49856 //IL_0901: Unknown result type (might be due to invalid IL or missing references)
49857 //IL_0906: Unknown result type (might be due to invalid IL or missing references)
49858 //IL_090b: Unknown result type (might be due to invalid IL or missing references)
49859 //IL_090d: Unknown result type (might be due to invalid IL or missing references)
49860 //IL_0914: Unknown result type (might be due to invalid IL or missing references)
49861 //IL_091a: Unknown result type (might be due to invalid IL or missing references)
49862 //IL_091c: Unknown result type (might be due to invalid IL or missing references)
49863 //IL_0921: Unknown result type (might be due to invalid IL or missing references)
49864 //IL_0924: Unknown result type (might be due to invalid IL or missing references)
49865 //IL_0929: Unknown result type (might be due to invalid IL or missing references)
49866 //IL_092b: Unknown result type (might be due to invalid IL or missing references)
49867 //IL_0930: Unknown result type (might be due to invalid IL or missing references)
49868 //IL_0937: Unknown result type (might be due to invalid IL or missing references)
49869 //IL_093c: Unknown result type (might be due to invalid IL or missing references)
49870 //IL_0943: Unknown result type (might be due to invalid IL or missing references)
49871 //IL_094a: Unknown result type (might be due to invalid IL or missing references)
49872 //IL_094f: Unknown result type (might be due to invalid IL or missing references)
49873 //IL_0951: Unknown result type (might be due to invalid IL or missing references)
49874 //IL_095e: Unknown result type (might be due to invalid IL or missing references)
49875 //IL_0964: Unknown result type (might be due to invalid IL or missing references)
49876 //IL_0478: Unknown result type (might be due to invalid IL or missing references)
49877 //IL_111a: Unknown result type (might be due to invalid IL or missing references)
49878 //IL_1120: Unknown result type (might be due to invalid IL or missing references)
49879 //IL_112a: Unknown result type (might be due to invalid IL or missing references)
49880 //IL_112f: Unknown result type (might be due to invalid IL or missing references)
49881 //IL_1153: Unknown result type (might be due to invalid IL or missing references)
49882 //IL_1159: Unknown result type (might be due to invalid IL or missing references)
49883 //IL_119d: Unknown result type (might be due to invalid IL or missing references)
49884 //IL_11a7: Unknown result type (might be due to invalid IL or missing references)
49885 //IL_11ac: Unknown result type (might be due to invalid IL or missing references)
49886 //IL_0495: Unknown result type (might be due to invalid IL or missing references)
49887 //IL_1409: Unknown result type (might be due to invalid IL or missing references)
49888 //IL_140f: Unknown result type (might be due to invalid IL or missing references)
49889 //IL_1419: Unknown result type (might be due to invalid IL or missing references)
49890 //IL_141e: Unknown result type (might be due to invalid IL or missing references)
49891 //IL_1443: Unknown result type (might be due to invalid IL or missing references)
49892 //IL_1449: Unknown result type (might be due to invalid IL or missing references)
49893 //IL_1485: Unknown result type (might be due to invalid IL or missing references)
49894 //IL_148f: Unknown result type (might be due to invalid IL or missing references)
49895 //IL_1494: Unknown result type (might be due to invalid IL or missing references)
49896 //IL_11f5: Unknown result type (might be due to invalid IL or missing references)
49897 //IL_11fb: Unknown result type (might be due to invalid IL or missing references)
49898 //IL_1205: Unknown result type (might be due to invalid IL or missing references)
49899 //IL_120a: Unknown result type (might be due to invalid IL or missing references)
49900 //IL_120f: Unknown result type (might be due to invalid IL or missing references)
49901 //IL_1692: Unknown result type (might be due to invalid IL or missing references)
49902 //IL_1698: Unknown result type (might be due to invalid IL or missing references)
49903 //IL_169d: Unknown result type (might be due to invalid IL or missing references)
49904 //IL_16a2: Unknown result type (might be due to invalid IL or missing references)
49905 //IL_16a7: Unknown result type (might be due to invalid IL or missing references)
49906 //IL_16ac: Unknown result type (might be due to invalid IL or missing references)
49907 //IL_16b3: Unknown result type (might be due to invalid IL or missing references)
49908 //IL_16b8: Unknown result type (might be due to invalid IL or missing references)
49909 //IL_16bc: Unknown result type (might be due to invalid IL or missing references)
49910 //IL_16c1: Unknown result type (might be due to invalid IL or missing references)
49911 //IL_16c8: Unknown result type (might be due to invalid IL or missing references)
49912 //IL_16cd: Unknown result type (might be due to invalid IL or missing references)
49913 //IL_04c0: Unknown result type (might be due to invalid IL or missing references)
49914 //IL_124c: Unknown result type (might be due to invalid IL or missing references)
49915 //IL_1252: Unknown result type (might be due to invalid IL or missing references)
49916 //IL_125c: Unknown result type (might be due to invalid IL or missing references)
49917 //IL_1261: Unknown result type (might be due to invalid IL or missing references)
49918 //IL_1266: Unknown result type (might be due to invalid IL or missing references)
49919 //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
49920 //IL_12a3: Unknown result type (might be due to invalid IL or missing references)
49921 //IL_12a9: Unknown result type (might be due to invalid IL or missing references)
49922 //IL_12b3: Unknown result type (might be due to invalid IL or missing references)
49923 //IL_12b8: Unknown result type (might be due to invalid IL or missing references)
49924 //IL_12bd: Unknown result type (might be due to invalid IL or missing references)
49925 //IL_15bd: Unknown result type (might be due to invalid IL or missing references)
49926 //IL_15d6: Unknown result type (might be due to invalid IL or missing references)
49927 //IL_12f9: Unknown result type (might be due to invalid IL or missing references)
49928 //IL_1307: Unknown result type (might be due to invalid IL or missing references)
49929 //IL_131a: Unknown result type (might be due to invalid IL or missing references)
49930 //IL_1344: Unknown result type (might be due to invalid IL or missing references)
49931 //IL_1349: Unknown result type (might be due to invalid IL or missing references)
49932 //IL_1366: Unknown result type (might be due to invalid IL or missing references)
49933 //IL_1374: Unknown result type (might be due to invalid IL or missing references)
49934 //IL_1387: Unknown result type (might be due to invalid IL or missing references)
49935 //IL_13b5: Unknown result type (might be due to invalid IL or missing references)
49936 //IL_13bf: Unknown result type (might be due to invalid IL or missing references)
49937 //IL_13c4: Unknown result type (might be due to invalid IL or missing references)
49938 //IL_0522: Unknown result type (might be due to invalid IL or missing references)
49939 //IL_052e: Unknown result type (might be due to invalid IL or missing references)
49940 //IL_0533: Unknown result type (might be due to invalid IL or missing references)
49941 //IL_0538: Unknown result type (might be due to invalid IL or missing references)
49942 //IL_053b: Unknown result type (might be due to invalid IL or missing references)
49943 //IL_0540: Unknown result type (might be due to invalid IL or missing references)
49944 //IL_2620: Unknown result type (might be due to invalid IL or missing references)
49945 //IL_2625: Unknown result type (might be due to invalid IL or missing references)
49946 //IL_054d: Unknown result type (might be due to invalid IL or missing references)
49947 //IL_0553: Unknown result type (might be due to invalid IL or missing references)
49948 //IL_0558: Unknown result type (might be due to invalid IL or missing references)
49949 //IL_055d: Unknown result type (might be due to invalid IL or missing references)
49950 //IL_0567: Unknown result type (might be due to invalid IL or missing references)
49951 //IL_056c: Unknown result type (might be due to invalid IL or missing references)
49952 //IL_1826: Unknown result type (might be due to invalid IL or missing references)
49953 //IL_182c: Unknown result type (might be due to invalid IL or missing references)
49954 //IL_1836: Unknown result type (might be due to invalid IL or missing references)
49955 //IL_183b: Unknown result type (might be due to invalid IL or missing references)
49956 //IL_185f: Unknown result type (might be due to invalid IL or missing references)
49957 //IL_1865: Unknown result type (might be due to invalid IL or missing references)
49958 //IL_18a9: Unknown result type (might be due to invalid IL or missing references)
49959 //IL_18b3: Unknown result type (might be due to invalid IL or missing references)
49960 //IL_18b8: Unknown result type (might be due to invalid IL or missing references)
49961 //IL_1bcd: Unknown result type (might be due to invalid IL or missing references)
49962 //IL_1bd7: Unknown result type (might be due to invalid IL or missing references)
49963 //IL_1bdc: Unknown result type (might be due to invalid IL or missing references)
49964 //IL_1901: Unknown result type (might be due to invalid IL or missing references)
49965 //IL_1907: Unknown result type (might be due to invalid IL or missing references)
49966 //IL_1911: Unknown result type (might be due to invalid IL or missing references)
49967 //IL_1916: Unknown result type (might be due to invalid IL or missing references)
49968 //IL_191b: Unknown result type (might be due to invalid IL or missing references)
49969 //IL_1958: Unknown result type (might be due to invalid IL or missing references)
49970 //IL_195e: Unknown result type (might be due to invalid IL or missing references)
49971 //IL_1968: Unknown result type (might be due to invalid IL or missing references)
49972 //IL_196d: Unknown result type (might be due to invalid IL or missing references)
49973 //IL_1972: Unknown result type (might be due to invalid IL or missing references)
49974 //IL_19af: Unknown result type (might be due to invalid IL or missing references)
49975 //IL_19b5: Unknown result type (might be due to invalid IL or missing references)
49976 //IL_19bf: Unknown result type (might be due to invalid IL or missing references)
49977 //IL_19c4: Unknown result type (might be due to invalid IL or missing references)
49978 //IL_19c9: Unknown result type (might be due to invalid IL or missing references)
49979 //IL_1a05: Unknown result type (might be due to invalid IL or missing references)
49980 //IL_1a13: Unknown result type (might be due to invalid IL or missing references)
49981 //IL_1a26: Unknown result type (might be due to invalid IL or missing references)
49982 //IL_1a4a: Unknown result type (might be due to invalid IL or missing references)
49983 //IL_1a4f: Unknown result type (might be due to invalid IL or missing references)
49984 //IL_1af9: Unknown result type (might be due to invalid IL or missing references)
49985 //IL_1aff: Unknown result type (might be due to invalid IL or missing references)
49986 //IL_1b09: Unknown result type (might be due to invalid IL or missing references)
49987 //IL_1b0e: Unknown result type (might be due to invalid IL or missing references)
49988 //IL_1b33: Unknown result type (might be due to invalid IL or missing references)
49989 //IL_1b39: Unknown result type (might be due to invalid IL or missing references)
49990 //IL_1b75: Unknown result type (might be due to invalid IL or missing references)
49991 //IL_1b7f: Unknown result type (might be due to invalid IL or missing references)
49992 //IL_1b84: Unknown result type (might be due to invalid IL or missing references)
49993 //IL_1a6c: Unknown result type (might be due to invalid IL or missing references)
49994 //IL_1a7a: Unknown result type (might be due to invalid IL or missing references)
49995 //IL_1a8d: Unknown result type (might be due to invalid IL or missing references)
49996 //IL_1ab5: Unknown result type (might be due to invalid IL or missing references)
49997 //IL_1abf: Unknown result type (might be due to invalid IL or missing references)
49998 //IL_1ac4: Unknown result type (might be due to invalid IL or missing references)
49999 //IL_1ca1: Unknown result type (might be due to invalid IL or missing references)
50000 //IL_1cc2: Unknown result type (might be due to invalid IL or missing references)
50001 //IL_1cc8: Unknown result type (might be due to invalid IL or missing references)
50002 //IL_1d0c: Unknown result type (might be due to invalid IL or missing references)
50003 //IL_1d16: Unknown result type (might be due to invalid IL or missing references)
50004 //IL_1d1b: Unknown result type (might be due to invalid IL or missing references)
50005 //IL_271e: Unknown result type (might be due to invalid IL or missing references)
50006 //IL_2728: Unknown result type (might be due to invalid IL or missing references)
50007 //IL_272d: Unknown result type (might be due to invalid IL or missing references)
50008 //IL_1e8b: Unknown result type (might be due to invalid IL or missing references)
50009 //IL_1e91: Unknown result type (might be due to invalid IL or missing references)
50010 //IL_1e9b: Unknown result type (might be due to invalid IL or missing references)
50011 //IL_1ea0: Unknown result type (might be due to invalid IL or missing references)
50012 //IL_1ec5: Unknown result type (might be due to invalid IL or missing references)
50013 //IL_1ecb: Unknown result type (might be due to invalid IL or missing references)
50014 //IL_1f0e: Unknown result type (might be due to invalid IL or missing references)
50015 //IL_1f18: Unknown result type (might be due to invalid IL or missing references)
50016 //IL_1f1d: Unknown result type (might be due to invalid IL or missing references)
50017 //IL_1f7e: Unknown result type (might be due to invalid IL or missing references)
50018 //IL_1fc6: Unknown result type (might be due to invalid IL or missing references)
50019 //IL_1fcc: Unknown result type (might be due to invalid IL or missing references)
50020 //IL_1fe1: Unknown result type (might be due to invalid IL or missing references)
50021 //IL_1feb: Unknown result type (might be due to invalid IL or missing references)
50022 //IL_1ff0: Unknown result type (might be due to invalid IL or missing references)
50023 //IL_200d: Unknown result type (might be due to invalid IL or missing references)
50024 //IL_2052: Unknown result type (might be due to invalid IL or missing references)
50025 //IL_2058: Unknown result type (might be due to invalid IL or missing references)
50026 //IL_206d: Unknown result type (might be due to invalid IL or missing references)
50027 //IL_2077: Unknown result type (might be due to invalid IL or missing references)
50028 //IL_207c: Unknown result type (might be due to invalid IL or missing references)
50029 //IL_236e: Unknown result type (might be due to invalid IL or missing references)
50030 //IL_238e: Unknown result type (might be due to invalid IL or missing references)
50031 //IL_2394: Unknown result type (might be due to invalid IL or missing references)
50032 //IL_23c6: Unknown result type (might be due to invalid IL or missing references)
50033 //IL_23ea: Unknown result type (might be due to invalid IL or missing references)
50034 //IL_23f8: Unknown result type (might be due to invalid IL or missing references)
50035 //IL_23fe: Unknown result type (might be due to invalid IL or missing references)
50036 //IL_2400: Unknown result type (might be due to invalid IL or missing references)
50037 //IL_240a: Unknown result type (might be due to invalid IL or missing references)
50038 //IL_240f: Unknown result type (might be due to invalid IL or missing references)
50039 //IL_2414: Unknown result type (might be due to invalid IL or missing references)
50040 //IL_2176: Unknown result type (might be due to invalid IL or missing references)
50041 //IL_2197: Unknown result type (might be due to invalid IL or missing references)
50042 //IL_219d: Unknown result type (might be due to invalid IL or missing references)
50043 //IL_220c: Unknown result type (might be due to invalid IL or missing references)
50044 //IL_2220: Unknown result type (might be due to invalid IL or missing references)
50045 //IL_222e: Unknown result type (might be due to invalid IL or missing references)
50046 //IL_2234: Unknown result type (might be due to invalid IL or missing references)
50047 //IL_2236: Unknown result type (might be due to invalid IL or missing references)
50048 //IL_2240: Unknown result type (might be due to invalid IL or missing references)
50049 //IL_2245: Unknown result type (might be due to invalid IL or missing references)
50050 //IL_224a: Unknown result type (might be due to invalid IL or missing references)
50051 //IL_22ba: Unknown result type (might be due to invalid IL or missing references)
50052 //IL_22db: Unknown result type (might be due to invalid IL or missing references)
50053 //IL_22e1: Unknown result type (might be due to invalid IL or missing references)
50054 //IL_2313: Unknown result type (might be due to invalid IL or missing references)
50055 //IL_2329: Unknown result type (might be due to invalid IL or missing references)
50056 //IL_2337: Unknown result type (might be due to invalid IL or missing references)
50057 //IL_233d: Unknown result type (might be due to invalid IL or missing references)
50058 //IL_233f: Unknown result type (might be due to invalid IL or missing references)
50059 //IL_2349: Unknown result type (might be due to invalid IL or missing references)
50060 //IL_234e: Unknown result type (might be due to invalid IL or missing references)
50061 //IL_2353: Unknown result type (might be due to invalid IL or missing references)
50062 if (wet && (type == 799 || type == 800 || type == 801 || type == 810 || type == 906 || type == 784 || type == 785 || type == 786 || type == 805 || type == 903 || type == 787 || type == 788 || type == 789 || type == 806 || type == 904 || type == 790 || type == 791 || type == 792 || type == 807 || type == 905))
50063 {
50064 timeLeft = 1;
50065 }
50066 if (type == 108 || type == 164 || type == 1002)
50067 {
50068 ai[0] += 1f;
50069 if (ai[0] > 3f)
50070 {
50071 Kill();
50072 }
50073 }
50074 if (type == 102)
50075 {
50076 int num = (int)(base.Center.X / 16f);
50077 int num12 = (int)(base.Center.Y / 16f);
50078 if (WorldGen.InWorld(num, num12))
50079 {
50080 Tile tile = Main.tile[num, num12];
50081 if (tile != null && tile.active() && (TileID.Sets.Platforms[tile.type] || tile.type == 380))
50082 {
50083 Kill();
50084 return;
50085 }
50086 }
50087 }
50088 Vector2 center;
50089 if (type == 75)
50090 {
50091 if (localAI[0] == 0f)
50092 {
50093 localAI[0] = 1f;
50094 SoundEngine.PlaySound(66, (int)position.X, (int)position.Y);
50095 }
50096 for (int i = 0; i < 255; i++)
50097 {
50098 if (Main.player[i].active && !Main.player[i].dead && !Main.player[i].ghost)
50099 {
50100 center = base.Center - Main.player[i].Center;
50101 if (((Vector2)(ref center)).Length() < 40f)
50102 {
50103 Kill();
50104 return;
50105 }
50106 }
50107 }
50108 }
50109 bool flag = false;
50110 if (type == 37 || type == 397 || type == 470 || type == 519 || type == 773 || type == 911)
50111 {
50112 try
50113 {
50114 int num23 = (int)(position.X / 16f) - 1;
50115 int num24 = (int)((position.X + (float)width) / 16f) + 2;
50116 int num25 = (int)(position.Y / 16f) - 1;
50117 int num26 = (int)((position.Y + (float)height) / 16f) + 2;
50118 if (num23 < 0)
50119 {
50120 num23 = 0;
50121 }
50122 if (num24 > Main.maxTilesX)
50123 {
50124 num24 = Main.maxTilesX;
50125 }
50126 if (num25 < 0)
50127 {
50128 num25 = 0;
50129 }
50130 if (num26 > Main.maxTilesY)
50131 {
50132 num26 = Main.maxTilesY;
50133 }
50134 Vector2 vector = default(Vector2);
50135 for (int j = num23; j < num24; j++)
50136 {
50137 for (int k = num25; k < num26; k++)
50138 {
50139 if (Main.tile[j, k] == null || !Main.tile[j, k].nactive() || !Main.tileSolid[Main.tile[j, k].type] || Main.tileSolidTop[Main.tile[j, k].type])
50140 {
50141 continue;
50142 }
50143 vector.X = j * 16;
50144 vector.Y = k * 16;
50145 if (!(position.X + (float)width - 4f > vector.X) || !(position.X + 4f < vector.X + 16f) || !(position.Y + (float)height - 4f > vector.Y) || !(position.Y + 4f < vector.Y + 16f))
50146 {
50147 continue;
50148 }
50149 if (type == 911 && owner == Main.myPlayer && localAI[0] == 0f)
50150 {
50151 float num27 = 12f;
50152 Vector2 value = vector + new Vector2(8f, 8f);
50153 if (Vector2.Distance(base.Center, value) < num27)
50154 {
50155 base.Center += velocity.SafeNormalize(Vector2.Zero) * -4f;
50156 }
50157 localAI[0] = 1f;
50158 netUpdate = true;
50159 }
50160 velocity.X = 0f;
50161 velocity.Y = -0.2f;
50162 flag = true;
50163 }
50164 }
50165 }
50166 catch
50167 {
50168 }
50169 }
50170 if (flag && type == 911)
50171 {
50172 Point p = base.Center.ToTileCoordinates();
50173 if (WorldGen.SolidOrSlopedTile(Framing.GetTileSafely(p.X, p.Y)))
50174 {
50175 Vector2 v = p.ToWorldCoordinates() - base.Center;
50176 base.Center += v.SafeNormalize(Vector2.Zero) * -4f;
50177 }
50178 }
50179 if (flag && type == 773)
50180 {
50181 Player player = Main.player[owner];
50182 Vector2 v2 = DirectionTo(player.Center).SafeNormalize(Vector2.UnitX * (float)player.direction);
50183 float num28 = rotation;
50184 float num29 = v2.ToRotation() + (float)Math.PI / 2f;
50185 rotation = rotation.AngleLerp(num29, 0.2f);
50186 rotation = rotation.AngleTowards(num29, 0.05f);
50187 Vector2 vector2 = (rotation - (float)Math.PI / 2f).ToRotationVector2();
50188 if (Main.rand.Next(3) == 0)
50189 {
50190 Dust dust = Dust.NewDustPerfect(base.Center + vector2 * 10f, 59, vector2 * 2f + Main.rand.NextVector2Circular(0.25f, 0.25f), 0, default(Color), 2f);
50191 dust.noGravity = true;
50192 if (Main.rand.Next(3) == 0)
50193 {
50194 dust.velocity *= 1.5f;
50195 dust.noGravity = false;
50196 dust.scale /= 2f;
50197 }
50198 }
50199 if (Main.rand.Next(3) == 0)
50200 {
50202 Dust.NewDustPerfect(base.Center + vector2 * -10f, 59, scarabBombDigDirectionSnap.ToVector2() * 1.5f, 0, default(Color), 2f).noGravity = true;
50203 }
50204 if (Main.rand.Next(15) == 0)
50205 {
50206 Dust dust2 = Dust.NewDustPerfect(base.Center + vector2 * 10f, 88, vector2 * 3f + Main.rand.NextVector2Circular(0.25f, 0.25f), 0, default(Color), 2f);
50207 dust2.noGravity = true;
50208 if (Main.rand.Next(3) == 0)
50209 {
50210 dust2.velocity *= 1.5f;
50211 }
50212 }
50213 bool flag2 = Main.rand.Next(30) == 0;
50214 if (num28 != rotation && Main.rand.Next(40) == 0)
50215 {
50216 flag2 = true;
50217 }
50218 if (flag2)
50219 {
50220 float num2 = (float)Math.PI * 2f * Main.rand.NextFloat();
50221 for (float num3 = 0f; num3 < 1f; num3 += 1f / 7f)
50222 {
50223 Vector2 spinningpoint = (num3 * ((float)Math.PI * 2f) + num2).ToRotationVector2();
50224 spinningpoint *= new Vector2(1f, 0.3f);
50225 Vector2 spinningpoint2 = spinningpoint;
50226 double radians = num29;
50227 center = default(Vector2);
50229 Dust dust5 = Dust.NewDustPerfect(base.Center + spinningpoint + vector2 * 8f, 59, vector2 * 3f + spinningpoint);
50230 dust5.noGravity = true;
50231 dust5.fadeIn = 1.6f;
50232 }
50233 }
50234 if (++frameCounter >= 3)
50235 {
50236 frameCounter = 0;
50237 if (++frame >= 4)
50238 {
50239 frame = 0;
50240 }
50241 }
50242 }
50243 if (type == 519)
50244 {
50245 localAI[1] += 1f;
50246 float num4 = 180f - localAI[1];
50247 if (num4 < 0f)
50248 {
50249 num4 = 0f;
50250 }
50251 frameCounter++;
50252 if (num4 < 15f)
50253 {
50254 frameCounter++;
50255 }
50256 if ((float)frameCounter >= (num4 / 10f + 6f) / 2f)
50257 {
50258 frame++;
50259 frameCounter = 0;
50260 if (frame >= Main.projFrames[type])
50261 {
50262 frame = 0;
50263 }
50264 }
50265 }
50266 if (type == 681 && localAI[1] == 0f)
50267 {
50268 localAI[1] = 1f;
50269 }
50270 int num5 = 6;
50271 if (type == 776 || type == 780 || type == 803 || type == 804)
50272 {
50273 num5 = 228;
50274 }
50275 else if (type == 784 || type == 805)
50276 {
50277 num5 = ((Main.rand.Next(3) == 0) ? 6 : Dust.dustWater());
50278 }
50279 else if (type == 787 || type == 806)
50280 {
50281 num5 = ((Main.rand.Next(3) == 0) ? 6 : 35);
50282 }
50283 else if (type == 790 || type == 807)
50284 {
50285 num5 = ((Main.rand.Next(3) == 0) ? 6 : 152);
50286 }
50287 if (type == 102)
50288 {
50289 if (velocity.Y > 10f)
50290 {
50291 velocity.Y = 10f;
50292 }
50293 if (localAI[0] == 0f)
50294 {
50295 localAI[0] = 1f;
50297 }
50298 frameCounter++;
50299 if (frameCounter > 3)
50300 {
50301 frame++;
50302 frameCounter = 0;
50303 }
50304 if (frame > 1)
50305 {
50306 frame = 0;
50307 }
50308 if (velocity.Y == 0f)
50309 {
50310 position.X += width / 2;
50311 position.Y += height / 2;
50312 width = 128;
50313 height = 128;
50314 position.X -= width / 2;
50315 position.Y -= height / 2;
50316 damage = 40;
50317 knockBack = 8f;
50318 timeLeft = 3;
50319 netUpdate = true;
50320 }
50321 }
50322 if (type == 303 && timeLeft <= 3 && hostile)
50323 {
50324 position.X += width / 2;
50325 position.Y += height / 2;
50326 width = 128;
50327 height = 128;
50328 position.X -= width / 2;
50329 position.Y -= height / 2;
50330 }
50331 if (owner == Main.myPlayer && timeLeft <= 3)
50332 {
50334 }
50335 else
50336 {
50337 if (type != 30 && type != 75 && type != 517 && type != 681 && type != 588 && type != 397 && type != 108 && type != 1002 && type != 133 && type != 134 && type != 135 && type != 136 && type != 137 && type != 138 && type != 139 && type != 140 && type != 141 && type != 142 && type != 143 && type != 144 && type != 164 && type != 303 && type != 338 && type != 339 && type != 340 && type != 341 && (type < 776 || type > 801) && (type < 803 || type > 810) && type != 862 && type != 863 && type != 930)
50338 {
50339 damage = 0;
50340 }
50341 if (type == 338 || type == 339 || type == 340 || type == 341 || type == 803 || type == 804 || type == 808 || type == 809 || type == 810 || type == 805 || type == 806 || type == 807 || type == 930)
50342 {
50343 localAI[1] += 1f;
50344 if (localAI[1] > 6f)
50345 {
50346 alpha = 0;
50347 }
50348 else
50349 {
50350 alpha = (int)(255f - 42f * localAI[1]) + 100;
50351 if (alpha > 255)
50352 {
50353 alpha = 255;
50354 }
50355 }
50356 for (int l = 0; l < 2; l++)
50357 {
50358 float num6 = 0f;
50359 float num7 = 0f;
50360 if (l == 1)
50361 {
50362 num6 = velocity.X * 0.5f;
50363 num7 = velocity.Y * 0.5f;
50364 }
50365 if (!(localAI[1] > 9f))
50366 {
50367 continue;
50368 }
50369 if (Main.rand.Next(2) == 0)
50370 {
50371 int num8 = Dust.NewDust(new Vector2(position.X + 3f + num6, position.Y + 3f + num7) - velocity * 0.5f, width - 8, height - 8, num5, 0f, 0f, 100);
50372 Main.dust[num8].scale *= 1.4f + (float)Main.rand.Next(10) * 0.1f;
50373 Dust obj2 = Main.dust[num8];
50374 obj2.velocity *= 0.2f;
50375 Main.dust[num8].noGravity = true;
50376 if (Main.dust[num8].type == 152)
50377 {
50378 Main.dust[num8].scale *= 0.5f;
50379 Dust obj3 = Main.dust[num8];
50380 obj3.velocity += velocity * 0.1f;
50381 }
50382 else if (Main.dust[num8].type == 35)
50383 {
50384 Main.dust[num8].scale *= 0.5f;
50385 Dust obj4 = Main.dust[num8];
50386 obj4.velocity += velocity * 0.1f;
50387 }
50388 else if (Main.dust[num8].type == Dust.dustWater())
50389 {
50390 Main.dust[num8].scale *= 0.65f;
50391 Dust obj5 = Main.dust[num8];
50392 obj5.velocity += velocity * 0.1f;
50393 }
50394 if (type == 808 || type == 809)
50395 {
50396 Dust dust3 = Main.dust[num8];
50397 if (dust3.dustIndex != 6000)
50398 {
50399 dust3 = Dust.NewDustPerfect(dust3.position, dust3.type, dust3.velocity, dust3.alpha, dust3.color, dust3.scale + 0.5f);
50400 dust3.velocity = Main.rand.NextVector2Circular(3f, 3f);
50401 dust3.noGravity = true;
50402 }
50403 if (dust3.dustIndex != 6000)
50404 {
50405 dust3 = Dust.NewDustPerfect(dust3.position, dust3.type, dust3.velocity, dust3.alpha, dust3.color, dust3.scale + 0.5f);
50406 dust3.velocity = ((float)Math.PI * 2f * ((float)timeLeft / 20f)).ToRotationVector2() * 3f;
50407 dust3.noGravity = true;
50408 }
50409 }
50410 }
50411 if (Main.rand.Next(2) == 0)
50412 {
50413 int num9 = Dust.NewDust(new Vector2(position.X + 3f + num6, position.Y + 3f + num7) - velocity * 0.5f, width - 8, height - 8, 31, 0f, 0f, 100, default(Color), 0.5f);
50414 Main.dust[num9].fadeIn = 0.5f + (float)Main.rand.Next(5) * 0.1f;
50415 Dust obj6 = Main.dust[num9];
50416 obj6.velocity *= 0.05f;
50417 }
50418 }
50419 float x = position.X;
50420 float y = position.Y;
50421 float num10 = 600f;
50422 if (type == 930)
50423 {
50424 num10 = 650f;
50425 }
50426 bool flag3 = false;
50427 ai[0] += 1f;
50428 if (ai[0] > 30f)
50429 {
50430 ai[0] = 30f;
50431 for (int m = 0; m < 200; m++)
50432 {
50433 if (Main.npc[m].CanBeChasedBy(this))
50434 {
50435 float num11 = Main.npc[m].position.X + (float)(Main.npc[m].width / 2);
50436 float num13 = Main.npc[m].position.Y + (float)(Main.npc[m].height / 2);
50437 float num14 = Math.Abs(position.X + (float)(width / 2) - num11) + Math.Abs(position.Y + (float)(height / 2) - num13);
50438 if (num14 < num10 && Collision.CanHit(position, width, height, Main.npc[m].position, Main.npc[m].width, Main.npc[m].height))
50439 {
50440 num10 = num14;
50441 x = num11;
50442 y = num13;
50443 flag3 = true;
50444 }
50445 }
50446 }
50447 }
50448 if (!flag3)
50449 {
50450 x = position.X + (float)(width / 2) + velocity.X * 100f;
50451 y = position.Y + (float)(height / 2) + velocity.Y * 100f;
50452 }
50453 float num15 = 16f;
50454 if (type == 930)
50455 {
50456 num15 = 12f;
50457 }
50458 Vector2 value2 = (new Vector2(x, y) - base.Center).SafeNormalize(-Vector2.UnitY) * num15;
50459 velocity = Vector2.Lerp(velocity, value2, 1f / 12f);
50460 }
50461 else if (type == 134 || type == 137 || type == 140 || type == 143 || type == 303 || type == 776 || type == 780 || type == 793 || type == 796 || type == 799 || type == 784 || type == 787 || type == 790)
50462 {
50463 if (Math.Abs(velocity.X) >= 8f || Math.Abs(velocity.Y) >= 8f)
50464 {
50465 for (int n = 0; n < 2; n++)
50466 {
50467 float num16 = 0f;
50468 float num17 = 0f;
50469 if (n == 1)
50470 {
50471 num16 = velocity.X * 0.5f;
50472 num17 = velocity.Y * 0.5f;
50473 }
50474 int num18 = Dust.NewDust(new Vector2(position.X + 3f + num16, position.Y + 3f + num17) - velocity * 0.5f, width - 8, height - 8, num5, 0f, 0f, 100);
50475 Main.dust[num18].scale *= 2f + (float)Main.rand.Next(10) * 0.1f;
50476 Dust obj7 = Main.dust[num18];
50477 obj7.velocity *= 0.2f;
50478 Main.dust[num18].noGravity = true;
50479 if (Main.dust[num18].type == 152)
50480 {
50481 Main.dust[num18].scale *= 0.5f;
50482 Dust obj8 = Main.dust[num18];
50483 obj8.velocity += velocity * 0.1f;
50484 }
50485 else if (Main.dust[num18].type == 35)
50486 {
50487 Main.dust[num18].scale *= 0.5f;
50488 Dust obj9 = Main.dust[num18];
50489 obj9.velocity += velocity * 0.1f;
50490 }
50491 else if (Main.dust[num18].type == Dust.dustWater())
50492 {
50493 Main.dust[num18].scale *= 0.65f;
50494 Dust obj10 = Main.dust[num18];
50495 obj10.velocity += velocity * 0.1f;
50496 }
50497 if (type == 793 || type == 796)
50498 {
50499 Dust dust4 = Main.dust[num18];
50500 if (dust4.dustIndex != 6000)
50501 {
50502 dust4 = Dust.NewDustPerfect(dust4.position, dust4.type, dust4.velocity, dust4.alpha, dust4.color, dust4.scale);
50503 dust4.velocity = Main.rand.NextVector2Circular(3f, 3f);
50504 dust4.noGravity = true;
50505 }
50506 if (dust4.dustIndex != 6000)
50507 {
50508 dust4 = Dust.NewDustPerfect(dust4.position, dust4.type, dust4.velocity, dust4.alpha, dust4.color, dust4.scale);
50509 dust4.velocity = ((float)Math.PI * 2f * ((float)timeLeft / 20f)).ToRotationVector2() * 3f;
50510 dust4.noGravity = true;
50511 }
50512 }
50513 num18 = Dust.NewDust(new Vector2(position.X + 3f + num16, position.Y + 3f + num17) - velocity * 0.5f, width - 8, height - 8, 31, 0f, 0f, 100, default(Color), 0.5f);
50514 Main.dust[num18].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f;
50515 Dust obj11 = Main.dust[num18];
50516 obj11.velocity *= 0.05f;
50517 }
50518 }
50519 if (Math.Abs(velocity.X) < 15f && Math.Abs(velocity.Y) < 15f)
50520 {
50521 velocity *= 1.1f;
50522 }
50523 }
50524 else if (type == 133 || type == 136 || type == 139 || type == 142 || type == 777 || type == 781 || type == 794 || type == 797 || type == 800 || type == 785 || type == 788 || type == 791)
50525 {
50526 int num19 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100);
50527 Main.dust[num19].scale *= 1f + (float)Main.rand.Next(10) * 0.1f;
50528 Dust obj12 = Main.dust[num19];
50529 obj12.velocity *= 0.2f;
50530 Main.dust[num19].noGravity = true;
50531 }
50532 else if (type == 135 || type == 138 || type == 141 || type == 144 || type == 778 || type == 782 || type == 795 || type == 798 || type == 801 || type == 786 || type == 789 || type == 792)
50533 {
50534 if ((double)velocity.X > -0.2 && (double)velocity.X < 0.2 && (double)velocity.Y > -0.2 && (double)velocity.Y < 0.2)
50535 {
50536 alpha += 2;
50537 if (alpha > 200)
50538 {
50539 alpha = 200;
50540 }
50541 }
50542 else
50543 {
50544 alpha = 0;
50545 int num20 = Dust.NewDust(new Vector2(position.X + 3f, position.Y + 3f) - velocity * 0.5f, width - 8, height - 8, 31, 0f, 0f, 100);
50546 Main.dust[num20].scale *= 1.6f + (float)Main.rand.Next(5) * 0.1f;
50547 Dust obj13 = Main.dust[num20];
50548 obj13.velocity *= 0.05f;
50549 Main.dust[num20].noGravity = true;
50550 }
50551 }
50552 else if (type == 779 || type == 783 || type == 862 || type == 863)
50553 {
50554 if (Main.rand.Next(25) == 0)
50555 {
50556 Dust dust6 = Dust.NewDustDirect(position, width, height, 228, (0f - velocity.X) / 10f, (0f - velocity.Y) / 10f, 100);
50557 dust6.noGravity = true;
50558 dust6.velocity *= 0f;
50559 dust6.scale = 1.3f;
50560 }
50561 if (Main.rand.Next(5) == 0)
50562 {
50563 Dust dust7 = Dust.NewDustDirect(position, width, height, 31, (0f - velocity.X) / 10f, (0f - velocity.Y) / 10f, 100);
50564 dust7.noGravity = true;
50565 dust7.velocity *= 0f;
50566 dust7.scale = 1.3f;
50567 }
50568 if (frameCounter == 0)
50569 {
50570 frameCounter = 1;
50571 frame = Main.rand.Next(4);
50572 }
50573 }
50574 else if (type != 30 && type != 517 && type != 681 && type != 397 && type != 519 && type != 588 && type != 779 && type != 783 && type != 862 && type != 863 && Main.rand.Next(2) == 0)
50575 {
50576 int num21 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100);
50577 Main.dust[num21].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
50578 Main.dust[num21].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
50579 Main.dust[num21].noGravity = true;
50580 Dust obj14 = Main.dust[num21];
50581 Vector2 center2 = base.Center;
50582 Vector2 spinningpoint3 = new Vector2(0f, (float)(-height / 2));
50583 double radians2 = rotation;
50584 center = default(Vector2);
50585 obj14.position = center2 + Utils.RotatedBy(spinningpoint3, radians2, center) * 1.1f;
50586 int num22 = 6;
50587 if (type == 773)
50588 {
50589 num22 = 59;
50590 }
50591 if (type == 903)
50592 {
50593 num22 = Dust.dustWater();
50594 }
50595 if (type == 904)
50596 {
50597 num22 = 35;
50598 }
50599 if (type == 905)
50600 {
50601 num22 = 152;
50602 }
50603 if (type == 910 || type == 911)
50604 {
50605 num22 = 0;
50606 }
50607 Dust dust8 = Dust.NewDustDirect(position, width, height, num22, 0f, 0f, 100);
50608 dust8.scale = 1f + (float)Main.rand.Next(5) * 0.1f;
50609 dust8.noGravity = true;
50610 Vector2 center3 = base.Center;
50611 Vector2 spinningpoint4 = new Vector2(0f, (float)(-height / 2 - 6));
50612 double radians3 = rotation;
50613 center = default(Vector2);
50614 dust8.position = center3 + Utils.RotatedBy(spinningpoint4, radians3, center) * 1.1f;
50615 }
50616 else if (type == 681)
50617 {
50618 Dust dust9 = Dust.NewDustDirect(position, width, height, 6, 0f, 0f, 100);
50619 dust9.scale = 1f + (float)Main.rand.Next(5) * 0.1f;
50620 dust9.noGravity = true;
50621 Vector2 center4 = base.Center;
50622 Vector2 spinningpoint5 = new Vector2((float)(6 * Math.Sign(velocity.X)), (float)(-height / 2 - 6));
50623 double radians4 = rotation;
50624 center = default(Vector2);
50625 dust9.position = center4 + Utils.RotatedBy(spinningpoint5, radians4, center) * 1.1f;
50626 }
50627 }
50628 ai[0] += 1f;
50629 if (type == 338 || type == 339 || type == 340 || type == 341 || type == 803 || type == 804 || type == 808 || type == 809 || type == 810 || type == 805 || type == 806 || type == 807 || type == 930)
50630 {
50631 if (velocity.X < 0f)
50632 {
50633 spriteDirection = -1;
50634 rotation = (float)Math.Atan2(0f - velocity.Y, 0f - velocity.X) - 1.57f;
50635 }
50636 else
50637 {
50638 spriteDirection = 1;
50639 rotation = (float)Math.Atan2(velocity.Y, velocity.X) + 1.57f;
50640 }
50641 }
50642 else if (type == 134 || type == 137 || type == 140 || type == 143 || type == 303 || type == 776 || type == 780 || type == 793 || type == 796 || type == 799 || type == 784 || type == 787 || type == 790)
50643 {
50644 if (velocity != Vector2.Zero)
50645 {
50646 rotation = (float)Math.Atan2(velocity.Y, velocity.X) + 1.57f;
50647 }
50648 }
50649 else if (type == 135 || type == 138 || type == 141 || type == 144 || type == 778 || type == 782 || type == 795 || type == 798 || type == 801 || type == 786 || type == 789 || type == 792)
50650 {
50651 velocity.Y += 0.2f;
50652 velocity *= 0.97f;
50653 if ((double)velocity.X > -0.1 && (double)velocity.X < 0.1)
50654 {
50655 velocity.X = 0f;
50656 }
50657 if ((double)velocity.Y > -0.1 && (double)velocity.Y < 0.1)
50658 {
50659 velocity.Y = 0f;
50660 }
50661 }
50662 else if (type == 133 || type == 136 || type == 139 || type == 142 || type == 777 || type == 781 || type == 794 || type == 797 || type == 800 || type == 785 || type == 788 || type == 791)
50663 {
50664 if (ai[0] > 15f)
50665 {
50666 if (velocity.Y == 0f)
50667 {
50668 velocity.X *= 0.95f;
50669 }
50670 velocity.Y += 0.2f;
50671 }
50672 }
50673 else if (((type == 30 || type == 397 || type == 517 || type == 681 || type == 588 || type == 779 || type == 783 || type == 862 || type == 863) && ai[0] > 10f) || (type != 30 && type != 397 && type != 517 && type != 588 && type != 779 && type != 783 && type != 862 && type != 863 && ai[0] > 5f))
50674 {
50675 ai[0] = 10f;
50676 if (velocity.Y == 0f && velocity.X != 0f)
50677 {
50678 velocity.X *= 0.97f;
50679 if (type == 29 || type == 470 || type == 637)
50680 {
50681 velocity.X *= 0.99f;
50682 }
50683 if ((double)velocity.X > -0.01 && (double)velocity.X < 0.01)
50684 {
50685 velocity.X = 0f;
50686 netUpdate = true;
50687 }
50688 }
50689 velocity.Y += 0.2f;
50690 if (type == 911)
50691 {
50692 velocity.X = MathHelper.Clamp(velocity.X, -8f, 8f);
50693 velocity.Y = MathHelper.Clamp(velocity.Y, -8f, 8f);
50694 }
50695 }
50696 if (type == 519)
50697 {
50698 rotation += velocity.X * 0.06f;
50699 }
50700 else if (type != 134 && type != 137 && type != 140 && type != 143 && type != 303 && (type < 338 || type > 341) && type != 776 && type != 780 && type != 793 && type != 796 && type != 799 && type != 784 && type != 787 && type != 790 && type != 803 && type != 804 && type != 808 && type != 809 && type != 810 && type != 805 && type != 806 && type != 807 && type != 930)
50701 {
50702 rotation += velocity.X * 0.1f;
50703 }
50704 }
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 ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Definition Entity.cs:57
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
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
Vector2 DirectionTo(Vector2 Destination)
Definition Entity.cs:289
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static readonly SoundStyle Item10
Definition SoundID.cs:697
static bool[] Platforms
Definition TileID.cs:219
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
Point GetScarabBombDigDirectionSnap8()
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
bool hostile
If True, this projectile will hurt players and friendly NPCs (F:Terraria.NPC.friendly) Defaults to ...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Tile.active(), Terraria.Collision.CanHit(), Terraria.Entity.Center, Terraria.Entity.direction, Terraria.Main.dust, Terraria.Dust.dustWater(), Terraria.Framing.GetTileSafely(), Terraria.WorldGen.InWorld(), Terraria.ID.SoundID.Item10, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.myPlayer, Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), Terraria.Dust.NewDustPerfect(), Terraria.Main.npc, Terraria.ID.TileID.Sets.Platforms, Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.projFrames, Terraria.Main.rand, Terraria.Utils.RotatedBy(), Terraria.WorldGen.SolidOrSlopedTile(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, and Terraria.Tile.type.

+ Here is the call graph for this function: