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

◆ UpdateArmorLights()

void Terraria.Player.UpdateArmorLights ( )
inline

Definition at line 28907 of file Player.cs.

28908 {
28910 {
28911 return;
28912 }
28913 float num = 0f;
28914 float num2 = 0f;
28915 float num3 = 0f;
28916 switch (head)
28917 {
28918 case 11:
28919 num = 0.92f;
28920 num2 = 0.8f;
28921 num3 = 0.65f;
28922 break;
28923 case 216:
28924 num = 0.7f;
28925 num2 = 0.95f;
28926 num3 = 0.82f;
28927 break;
28928 case 169:
28929 num = 0f;
28930 num2 = 0.36f;
28931 num3 = 0.4f;
28932 break;
28933 case 170:
28934 num = 0.4f;
28935 num2 = 0.16f;
28936 num3 = 0.36f;
28937 break;
28938 case 171:
28939 num = 0.5f;
28940 num2 = 0.25f;
28941 num3 = 0.05f;
28942 break;
28943 case 189:
28944 num = 0.9f;
28945 num2 = 0.9f;
28946 num3 = 0.7f;
28947 break;
28948 case 178:
28949 num = 0.1f;
28950 num2 = 0.2f;
28951 num3 = 0.3f;
28952 break;
28953 case 211:
28954 num = 0.2f;
28955 num2 = 0.4f;
28956 num3 = 0.8f;
28957 break;
28958 }
28959 float num4 = 0f;
28960 float num5 = 0f;
28961 float num6 = 0f;
28962 switch (body)
28963 {
28964 case 175:
28965 num4 = 0f;
28966 num5 = 0.36f;
28967 num6 = 0.4f;
28968 break;
28969 case 176:
28970 num4 = 0.4f;
28971 num5 = 0.16f;
28972 num6 = 0.36f;
28973 break;
28974 case 177:
28975 num4 = 0.5f;
28976 num5 = 0.25f;
28977 num6 = 0.05f;
28978 break;
28979 case 190:
28980 num = 0.9f;
28981 num2 = 0.9f;
28982 num3 = 0.7f;
28983 break;
28984 case 205:
28985 num4 = 0.2f;
28986 num5 = 0.4f;
28987 num6 = 0.8f;
28988 break;
28989 }
28990 float num7 = 0f;
28991 float num8 = 0f;
28992 float num9 = 0f;
28993 switch (legs)
28994 {
28995 case 110:
28996 num7 = 0f;
28997 num8 = 0.36f;
28998 num9 = 0.4f;
28999 break;
29000 case 111:
29001 num7 = 0.4f;
29002 num8 = 0.16f;
29003 num9 = 0.36f;
29004 break;
29005 case 112:
29006 num7 = 0.5f;
29007 num8 = 0.25f;
29008 num9 = 0.05f;
29009 break;
29010 case 130:
29011 num = 0.9f;
29012 num2 = 0.9f;
29013 num3 = 0.7f;
29014 break;
29015 }
29016 if (num != 0f || num2 != 0f || num3 != 0f)
29017 {
29018 float num10 = 1f;
29019 if (num == num4 && num2 == num5 && num3 == num6)
29020 {
29021 num10 += 0.5f;
29022 }
29023 if (num == num7 && num2 == num8 && num3 == num9)
29024 {
29025 num10 += 0.5f;
29026 }
29027 Vector2 spinningpoint = new Vector2(width / 2 + 8 * direction, 2f);
29028 if (fullRotation != 0f)
29029 {
29031 }
29032 int i = (int)(position.X + spinningpoint.X) / 16;
29033 int j = (int)(position.Y + spinningpoint.Y) / 16;
29034 Lighting.AddLight(i, j, num * num10, num2 * num10, num3 * num10);
29035 }
29036 if (num4 != 0f || num5 != 0f || num6 != 0f)
29037 {
29038 float num11 = 1f;
29039 if (num4 == num && num5 == num2 && num6 == num3)
29040 {
29041 num11 += 0.5f;
29042 }
29043 if (num4 == num7 && num5 == num8 && num6 == num9)
29044 {
29045 num11 += 0.5f;
29046 }
29047 Vector2 spinningpoint2 = new Vector2(width / 2 + 8, height / 2);
29048 if (fullRotation != 0f)
29049 {
29051 }
29052 int i2 = (int)(position.X + spinningpoint2.X) / 16;
29053 int j2 = (int)(position.Y + spinningpoint2.Y) / 16;
29054 Lighting.AddLight(i2, j2, num4 * num11, num5 * num11, num6 * num11);
29055 }
29056 if (num7 != 0f || num8 != 0f || num9 != 0f)
29057 {
29058 float num12 = 1f;
29059 if (num7 == num4 && num8 == num5 && num9 == num6)
29060 {
29061 num12 += 0.5f;
29062 }
29063 if (num7 == num && num8 == num2 && num9 == num3)
29064 {
29065 num12 += 0.5f;
29066 }
29067 Vector2 spinningpoint3 = new Vector2(width / 2 + 8 * direction, (float)height * 0.75f);
29068 if (fullRotation != 0f)
29069 {
29071 }
29072 int i3 = (int)(position.X + spinningpoint3.X) / 16;
29073 int j3 = (int)(position.Y + spinningpoint3.Y) / 16;
29074 Lighting.AddLight(i3, j3, num7 * num12, num8 * num12, num9 * num12);
29075 }
29076 }
Vector2 position
Definition Entity.cs:14
bool vortexStealthActive
Definition Player.cs:2411
float fullRotation
Definition Player.cs:1291
Vector2 fullRotationOrigin
Definition Player.cs:1293

References Terraria.Lighting.AddLight().