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

◆ UpdateArmorLights()

void Terraria.Player.UpdateArmorLights ( )
inline

Definition at line 28819 of file Player.cs.

28820 {
28821 //IL_030a: Unknown result type (might be due to invalid IL or missing references)
28822 //IL_0321: Unknown result type (might be due to invalid IL or missing references)
28823 //IL_02e9: Unknown result type (might be due to invalid IL or missing references)
28824 //IL_02f3: Unknown result type (might be due to invalid IL or missing references)
28825 //IL_02f8: Unknown result type (might be due to invalid IL or missing references)
28826 //IL_02fd: Unknown result type (might be due to invalid IL or missing references)
28827 //IL_03e2: Unknown result type (might be due to invalid IL or missing references)
28828 //IL_03f9: Unknown result type (might be due to invalid IL or missing references)
28829 //IL_03c1: Unknown result type (might be due to invalid IL or missing references)
28830 //IL_03cb: Unknown result type (might be due to invalid IL or missing references)
28831 //IL_03d0: Unknown result type (might be due to invalid IL or missing references)
28832 //IL_03d5: Unknown result type (might be due to invalid IL or missing references)
28833 //IL_04c9: Unknown result type (might be due to invalid IL or missing references)
28834 //IL_04e0: Unknown result type (might be due to invalid IL or missing references)
28835 //IL_04a8: Unknown result type (might be due to invalid IL or missing references)
28836 //IL_04b2: Unknown result type (might be due to invalid IL or missing references)
28837 //IL_04b7: Unknown result type (might be due to invalid IL or missing references)
28838 //IL_04bc: Unknown result type (might be due to invalid IL or missing references)
28840 {
28841 return;
28842 }
28843 float num = 0f;
28844 float num5 = 0f;
28845 float num6 = 0f;
28846 switch (head)
28847 {
28848 case 11:
28849 num = 0.92f;
28850 num5 = 0.8f;
28851 num6 = 0.65f;
28852 break;
28853 case 216:
28854 num = 0.7f;
28855 num5 = 0.95f;
28856 num6 = 0.82f;
28857 break;
28858 case 169:
28859 num = 0f;
28860 num5 = 0.36f;
28861 num6 = 0.4f;
28862 break;
28863 case 170:
28864 num = 0.4f;
28865 num5 = 0.16f;
28866 num6 = 0.36f;
28867 break;
28868 case 171:
28869 num = 0.5f;
28870 num5 = 0.25f;
28871 num6 = 0.05f;
28872 break;
28873 case 189:
28874 num = 0.9f;
28875 num5 = 0.9f;
28876 num6 = 0.7f;
28877 break;
28878 case 178:
28879 num = 0.1f;
28880 num5 = 0.2f;
28881 num6 = 0.3f;
28882 break;
28883 case 211:
28884 num = 0.2f;
28885 num5 = 0.4f;
28886 num6 = 0.8f;
28887 break;
28888 }
28889 float num7 = 0f;
28890 float num8 = 0f;
28891 float num9 = 0f;
28892 switch (body)
28893 {
28894 case 175:
28895 num7 = 0f;
28896 num8 = 0.36f;
28897 num9 = 0.4f;
28898 break;
28899 case 176:
28900 num7 = 0.4f;
28901 num8 = 0.16f;
28902 num9 = 0.36f;
28903 break;
28904 case 177:
28905 num7 = 0.5f;
28906 num8 = 0.25f;
28907 num9 = 0.05f;
28908 break;
28909 case 190:
28910 num = 0.9f;
28911 num5 = 0.9f;
28912 num6 = 0.7f;
28913 break;
28914 case 205:
28915 num7 = 0.2f;
28916 num8 = 0.4f;
28917 num9 = 0.8f;
28918 break;
28919 }
28920 float num10 = 0f;
28921 float num11 = 0f;
28922 float num12 = 0f;
28923 switch (legs)
28924 {
28925 case 110:
28926 num10 = 0f;
28927 num11 = 0.36f;
28928 num12 = 0.4f;
28929 break;
28930 case 111:
28931 num10 = 0.4f;
28932 num11 = 0.16f;
28933 num12 = 0.36f;
28934 break;
28935 case 112:
28936 num10 = 0.5f;
28937 num11 = 0.25f;
28938 num12 = 0.05f;
28939 break;
28940 case 130:
28941 num = 0.9f;
28942 num5 = 0.9f;
28943 num6 = 0.7f;
28944 break;
28945 }
28946 if (num != 0f || num5 != 0f || num6 != 0f)
28947 {
28948 float num2 = 1f;
28949 if (num == num7 && num5 == num8 && num6 == num9)
28950 {
28951 num2 += 0.5f;
28952 }
28953 if (num == num10 && num5 == num11 && num6 == num12)
28954 {
28955 num2 += 0.5f;
28956 }
28957 Vector2 spinningpoint = default(Vector2);
28958 ((Vector2)(ref spinningpoint))._002Ector((float)(width / 2 + 8 * direction), 2f);
28959 if (fullRotation != 0f)
28960 {
28962 }
28963 int i2 = (int)(position.X + spinningpoint.X) / 16;
28964 int i = (int)(position.Y + spinningpoint.Y) / 16;
28965 Lighting.AddLight(i2, i, num * num2, num5 * num2, num6 * num2);
28966 }
28967 if (num7 != 0f || num8 != 0f || num9 != 0f)
28968 {
28969 float num3 = 1f;
28970 if (num7 == num && num8 == num5 && num9 == num6)
28971 {
28972 num3 += 0.5f;
28973 }
28974 if (num7 == num10 && num8 == num11 && num9 == num12)
28975 {
28976 num3 += 0.5f;
28977 }
28978 Vector2 spinningpoint2 = default(Vector2);
28979 ((Vector2)(ref spinningpoint2))._002Ector((float)(width / 2 + 8), (float)(height / 2));
28980 if (fullRotation != 0f)
28981 {
28983 }
28984 int i3 = (int)(position.X + spinningpoint2.X) / 16;
28985 int j2 = (int)(position.Y + spinningpoint2.Y) / 16;
28986 Lighting.AddLight(i3, j2, num7 * num3, num8 * num3, num9 * num3);
28987 }
28988 if (num10 != 0f || num11 != 0f || num12 != 0f)
28989 {
28990 float num4 = 1f;
28991 if (num10 == num7 && num11 == num8 && num12 == num9)
28992 {
28993 num4 += 0.5f;
28994 }
28995 if (num10 == num && num11 == num5 && num12 == num6)
28996 {
28997 num4 += 0.5f;
28998 }
28999 Vector2 spinningpoint3 = default(Vector2);
29000 ((Vector2)(ref spinningpoint3))._002Ector((float)(width / 2 + 8 * direction), (float)height * 0.75f);
29001 if (fullRotation != 0f)
29002 {
29004 }
29005 int i4 = (int)(position.X + spinningpoint3.X) / 16;
29006 int j3 = (int)(position.Y + spinningpoint3.Y) / 16;
29007 Lighting.AddLight(i4, j3, num10 * num4, num11 * num4, num12 * num4);
29008 }
29009 }
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
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
bool vortexStealthActive
Definition Player.cs:2949
float fullRotation
Definition Player.cs:1801
Vector2 fullRotationOrigin
Definition Player.cs:1803

References Terraria.Lighting.AddLight(), Terraria.Player.body, Terraria.Entity.direction, Terraria.Player.fullRotation, Terraria.Player.fullRotationOrigin, Terraria.Player.head, Terraria.Entity.height, Terraria.Player.legs, Terraria.Entity.position, Terraria.Player.vortexStealthActive, and Terraria.Entity.width.

Referenced by Terraria.Player.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: