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

◆ UpdateBiomes()

void Terraria.Player.UpdateBiomes ( )
inline

Definition at line 14801 of file Player.cs.

14802 {
14803 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
14804 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
14805 //IL_000b: Unknown result type (might be due to invalid IL or missing references)
14806 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
14807 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
14808 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
14809 //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
14810 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
14811 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
14812 //IL_13ac: Unknown result type (might be due to invalid IL or missing references)
14813 //IL_13b1: Unknown result type (might be due to invalid IL or missing references)
14814 //IL_13b6: Unknown result type (might be due to invalid IL or missing references)
14815 //IL_13b8: Unknown result type (might be due to invalid IL or missing references)
14816 //IL_13bf: Unknown result type (might be due to invalid IL or missing references)
14817 //IL_13d6: Unknown result type (might be due to invalid IL or missing references)
14818 //IL_13dd: Unknown result type (might be due to invalid IL or missing references)
14819 //IL_13f6: Unknown result type (might be due to invalid IL or missing references)
14820 //IL_13fd: Unknown result type (might be due to invalid IL or missing references)
14821 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
14822 //IL_03b4: Unknown result type (might be due to invalid IL or missing references)
14823 //IL_03c7: Unknown result type (might be due to invalid IL or missing references)
14824 //IL_03d4: Unknown result type (might be due to invalid IL or missing references)
14825 //IL_03eb: Unknown result type (might be due to invalid IL or missing references)
14826 //IL_03f9: Unknown result type (might be due to invalid IL or missing references)
14827 //IL_0410: Unknown result type (might be due to invalid IL or missing references)
14828 //IL_041e: Unknown result type (might be due to invalid IL or missing references)
14829 //IL_043f: Unknown result type (might be due to invalid IL or missing references)
14830 //IL_0460: Unknown result type (might be due to invalid IL or missing references)
14831 //IL_0466: Unknown result type (might be due to invalid IL or missing references)
14832 //IL_047e: Unknown result type (might be due to invalid IL or missing references)
14833 //IL_04cd: Unknown result type (might be due to invalid IL or missing references)
14834 //IL_049f: Unknown result type (might be due to invalid IL or missing references)
14835 //IL_0533: Unknown result type (might be due to invalid IL or missing references)
14836 //IL_0538: Unknown result type (might be due to invalid IL or missing references)
14837 //IL_053a: Unknown result type (might be due to invalid IL or missing references)
14838 //IL_053f: Unknown result type (might be due to invalid IL or missing references)
14839 //IL_0541: Unknown result type (might be due to invalid IL or missing references)
14840 //IL_0546: Unknown result type (might be due to invalid IL or missing references)
14841 //IL_0548: Unknown result type (might be due to invalid IL or missing references)
14842 //IL_054d: Unknown result type (might be due to invalid IL or missing references)
14843 //IL_054f: Unknown result type (might be due to invalid IL or missing references)
14844 //IL_058c: Unknown result type (might be due to invalid IL or missing references)
14845 //IL_05d8: Unknown result type (might be due to invalid IL or missing references)
14846 //IL_05af: Unknown result type (might be due to invalid IL or missing references)
14847 //IL_05b4: Unknown result type (might be due to invalid IL or missing references)
14848 //IL_0624: Unknown result type (might be due to invalid IL or missing references)
14849 //IL_05fb: Unknown result type (might be due to invalid IL or missing references)
14850 //IL_0600: Unknown result type (might be due to invalid IL or missing references)
14851 //IL_0816: Unknown result type (might be due to invalid IL or missing references)
14852 //IL_0823: Unknown result type (might be due to invalid IL or missing references)
14853 //IL_0670: Unknown result type (might be due to invalid IL or missing references)
14854 //IL_0647: Unknown result type (might be due to invalid IL or missing references)
14855 //IL_064c: Unknown result type (might be due to invalid IL or missing references)
14856 //IL_06b6: Unknown result type (might be due to invalid IL or missing references)
14857 //IL_0690: Unknown result type (might be due to invalid IL or missing references)
14858 //IL_0695: Unknown result type (might be due to invalid IL or missing references)
14859 //IL_06d6: Unknown result type (might be due to invalid IL or missing references)
14860 //IL_06db: Unknown result type (might be due to invalid IL or missing references)
14861 //IL_0978: Unknown result type (might be due to invalid IL or missing references)
14862 //IL_0995: Unknown result type (might be due to invalid IL or missing references)
14863 //IL_09d4: Unknown result type (might be due to invalid IL or missing references)
14864 //IL_09e0: Unknown result type (might be due to invalid IL or missing references)
14865 //IL_09e5: Unknown result type (might be due to invalid IL or missing references)
14866 //IL_09fb: Unknown result type (might be due to invalid IL or missing references)
14867 //IL_0a07: Unknown result type (might be due to invalid IL or missing references)
14868 //IL_0a0c: Unknown result type (might be due to invalid IL or missing references)
14869 //IL_0a22: Unknown result type (might be due to invalid IL or missing references)
14870 //IL_0a2e: Unknown result type (might be due to invalid IL or missing references)
14871 //IL_0a33: Unknown result type (might be due to invalid IL or missing references)
14872 //IL_0a49: Unknown result type (might be due to invalid IL or missing references)
14873 //IL_0a55: Unknown result type (might be due to invalid IL or missing references)
14874 //IL_0a5a: Unknown result type (might be due to invalid IL or missing references)
14875 //IL_0a76: Unknown result type (might be due to invalid IL or missing references)
14876 //IL_0a7c: Unknown result type (might be due to invalid IL or missing references)
14877 //IL_09a2: Unknown result type (might be due to invalid IL or missing references)
14878 //IL_0aa7: Unknown result type (might be due to invalid IL or missing references)
14879 //IL_0aad: Unknown result type (might be due to invalid IL or missing references)
14880 //IL_0ac4: Unknown result type (might be due to invalid IL or missing references)
14881 //IL_0aca: Unknown result type (might be due to invalid IL or missing references)
14882 //IL_0b25: Unknown result type (might be due to invalid IL or missing references)
14883 //IL_0b2b: Unknown result type (might be due to invalid IL or missing references)
14884 //IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
14885 //IL_0b90: Unknown result type (might be due to invalid IL or missing references)
14886 //IL_0b63: Unknown result type (might be due to invalid IL or missing references)
14887 //IL_0b69: Unknown result type (might be due to invalid IL or missing references)
14888 //IL_0c42: Unknown result type (might be due to invalid IL or missing references)
14889 //IL_0c48: Unknown result type (might be due to invalid IL or missing references)
14890 //IL_0cb3: Unknown result type (might be due to invalid IL or missing references)
14891 //IL_0cb9: Unknown result type (might be due to invalid IL or missing references)
14892 //IL_0d1e: Unknown result type (might be due to invalid IL or missing references)
14893 //IL_0dbf: Unknown result type (might be due to invalid IL or missing references)
14894 //IL_0dfe: Unknown result type (might be due to invalid IL or missing references)
14895 //IL_0e77: Unknown result type (might be due to invalid IL or missing references)
14896 //IL_0ffe: Unknown result type (might be due to invalid IL or missing references)
14897 //IL_1003: Unknown result type (might be due to invalid IL or missing references)
14898 //IL_1005: Unknown result type (might be due to invalid IL or missing references)
14899 //IL_100c: Unknown result type (might be due to invalid IL or missing references)
14900 //IL_1014: Unknown result type (might be due to invalid IL or missing references)
14901 Point point = base.Center.ToTileCoordinates();
14902 ZoneDungeon = false;
14903 if (Main.SceneMetrics.DungeonTileCount >= 250 && (double)base.Center.Y > Main.worldSurface * 16.0)
14904 {
14905 int num = (int)base.Center.X / 16;
14906 int num12 = (int)base.Center.Y / 16;
14907 if (Main.tile[num, num12] != null && Main.wallDungeon[Main.tile[num, num12].wall])
14908 {
14909 ZoneDungeon = true;
14910 }
14911 }
14912 ZoneLihzhardTemple = false;
14913 int num15 = (int)base.Center.X / 16;
14914 int num16 = (int)base.Center.Y / 16;
14915 if (Main.tile[num15, num16] != null && Main.tile[num15, num16].wall == 87)
14916 {
14917 ZoneLihzhardTemple = true;
14918 }
14919 Tile tileSafely = Framing.GetTileSafely(base.Center);
14920 if (tileSafely != null)
14921 {
14922 behindBackWall = tileSafely.wall > 0;
14923 }
14924 if (behindBackWall && ZoneDesert && (double)base.Center.Y > Main.worldSurface)
14925 {
14927 {
14928 ZoneUndergroundDesert = true;
14929 }
14930 }
14931 else
14932 {
14933 ZoneUndergroundDesert = false;
14934 }
14935 if (behindBackWall && (tileSafely.wall == 184 || tileSafely.wall == 180))
14936 {
14937 ZoneGranite = true;
14938 }
14939 else
14940 {
14941 ZoneGranite = false;
14942 }
14943 if (behindBackWall && (tileSafely.wall == 183 || tileSafely.wall == 178))
14944 {
14945 ZoneMarble = true;
14946 }
14947 else
14948 {
14949 ZoneMarble = false;
14950 }
14951 if (behindBackWall && (tileSafely.wall == 108 || tileSafely.wall == 86))
14952 {
14953 ZoneHive = true;
14954 }
14955 else
14956 {
14957 ZoneHive = false;
14958 }
14959 if (behindBackWall && tileSafely.wall >= 48 && tileSafely.wall <= 53)
14960 {
14961 ZoneGemCave = true;
14962 }
14963 else
14964 {
14965 ZoneGemCave = false;
14966 }
14967 bool flag = (double)(Main.screenPosition.Y / 16f) > Main.worldSurface + 50.0 && Main.screenPosition.Y / 16f < (float)(Main.maxTilesY - 330 - 100);
14968 ZoneShimmer = Main.SceneMetrics.EnoughTilesForShimmer && flag;
14969 ZoneCorrupt = Main.SceneMetrics.EnoughTilesForCorruption;
14970 ZoneCrimson = Main.SceneMetrics.EnoughTilesForCrimson;
14971 ZoneHallow = Main.SceneMetrics.EnoughTilesForHallow;
14972 ZoneJungle = Main.SceneMetrics.EnoughTilesForJungle && position.Y / 16f < (float)Main.UnderworldLayer;
14973 ZoneSnow = Main.SceneMetrics.EnoughTilesForSnow;
14974 ZoneDesert = Main.SceneMetrics.EnoughTilesForDesert;
14975 ZoneGlowshroom = Main.SceneMetrics.EnoughTilesForGlowingMushroom;
14976 ZoneMeteor = Main.SceneMetrics.EnoughTilesForMeteor;
14977 ZoneWaterCandle = Main.SceneMetrics.WaterCandleCount > 0;
14978 ZonePeaceCandle = Main.SceneMetrics.PeaceCandleCount > 0;
14979 ZoneShadowCandle = Main.SceneMetrics.ShadowCandleCount > 0;
14980 ZoneGraveyard = Main.SceneMetrics.EnoughTilesForGraveyard;
14982 if (HasGardenGnomeNearby != Main.SceneMetrics.HasGardenGnome)
14983 {
14984 luckNeedsSync = true;
14985 HasGardenGnomeNearby = Main.SceneMetrics.HasGardenGnome;
14986 }
14987 ZoneUnderworldHeight = point.Y > Main.UnderworldLayer;
14988 ZoneRockLayerHeight = point.Y <= Main.UnderworldLayer && (double)point.Y > Main.rockLayer;
14989 ZoneDirtLayerHeight = (double)point.Y <= Main.rockLayer && (double)point.Y > Main.worldSurface;
14990 ZoneOverworldHeight = (double)point.Y <= Main.worldSurface && (double)point.Y > Main.worldSurface * 0.3499999940395355;
14991 ZoneSkyHeight = (double)point.Y <= Main.worldSurface * 0.3499999940395355;
14992 ZoneBeach = WorldGen.oceanDepths(point.X, point.Y);
14993 ZoneRain = Main.raining && (double)point.Y <= Main.worldSurface;
14994 if (Main.remixWorld)
14995 {
14996 ZoneSandstorm = (double)point.Y >= Main.rockLayer && ZoneDesert && !ZoneBeach && Sandstorm.Happening;
14997 }
14998 else
14999 {
15000 ZoneSandstorm = (double)point.Y <= Main.worldSurface && ZoneDesert && !ZoneBeach && Sandstorm.Happening;
15001 }
15002 bool flag9 = (ZoneTowerStardust = false);
15003 bool flag3 = flag9;
15005 bool flag4 = flag9;
15007 bool zoneTowerSolar = flag9;
15009 ZoneOldOneArmy = false;
15010 Vector2 vector = Vector2.Zero;
15011 Vector2 vector2 = Vector2.Zero;
15012 Vector2 vector3 = Vector2.Zero;
15013 Vector2 vector4 = Vector2.Zero;
15014 _ = Vector2.Zero;
15015 for (int i = 0; i < 200; i++)
15016 {
15017 if (!Main.npc[i].active)
15018 {
15019 continue;
15020 }
15021 if (Main.npc[i].type == 493)
15022 {
15023 if (Distance(Main.npc[i].Center) <= 4000f)
15024 {
15025 ZoneTowerStardust = true;
15026 vector4 = Main.npc[i].Center;
15027 }
15028 }
15029 else if (Main.npc[i].type == 507)
15030 {
15031 if (Distance(Main.npc[i].Center) <= 4000f)
15032 {
15033 ZoneTowerNebula = true;
15034 vector3 = Main.npc[i].Center;
15035 }
15036 }
15037 else if (Main.npc[i].type == 422)
15038 {
15039 if (Distance(Main.npc[i].Center) <= 4000f)
15040 {
15041 ZoneTowerVortex = true;
15042 vector2 = Main.npc[i].Center;
15043 }
15044 }
15045 else if (Main.npc[i].type == 517)
15046 {
15047 if (Distance(Main.npc[i].Center) <= 4000f)
15048 {
15049 ZoneTowerSolar = true;
15050 vector = Main.npc[i].Center;
15051 }
15052 }
15053 else if (Main.npc[i].type == 549 && Distance(Main.npc[i].Center) <= 4000f)
15054 {
15055 ZoneOldOneArmy = true;
15056 vector = Main.npc[i].Center;
15057 }
15058 }
15059 float num17 = 1f;
15060 float num18 = 1f;
15061 float num19 = Main.shimmerAlpha;
15063 {
15064 num17 *= 1f;
15065 num18 *= 0.7f;
15066 if (num19 < 1f)
15067 {
15068 num19 += 0.025f;
15069 if (num19 > 1f)
15070 {
15071 num19 = 1f;
15072 }
15073 }
15074 if (num19 >= 0.5f)
15075 {
15076 Main.shimmerDarken = MathHelper.Clamp(Main.shimmerDarken + 0.025f, 0f, 1f);
15077 Main.shimmerBrightenDelay = 4f;
15078 }
15079 }
15080 else if (num19 > 0f)
15081 {
15082 Main.shimmerDarken = MathHelper.Clamp(Main.shimmerDarken - 0.05f, 0f, 1f);
15083 if (Main.shimmerDarken == 0f && Main.shimmerBrightenDelay > 0f)
15084 {
15085 Main.shimmerBrightenDelay -= 1f;
15086 }
15087 if (Main.shimmerBrightenDelay == 0f)
15088 {
15089 num19 -= 0.05f;
15090 }
15091 if (num19 < 0f)
15092 {
15093 num19 = 0f;
15094 }
15095 }
15096 Main.shimmerAlpha = num19;
15097 if (Main.getGoodWorld)
15098 {
15099 bool flag5 = false;
15100 int num20 = NPC.FindFirstNPC(245);
15101 if (num20 >= 0 && Vector2.Distance(base.Center, Main.npc[num20].Center) < 2000f)
15102 {
15103 flag5 = true;
15104 }
15105 if (flag5)
15106 {
15107 num17 *= 0.6f;
15108 num18 *= 0.6f;
15109 }
15110 else if (ZoneLihzhardTemple)
15111 {
15112 num17 *= 0.88f;
15113 num18 *= 0.88f;
15114 }
15115 else if (ZoneDungeon)
15116 {
15117 num17 *= 0.94f;
15118 num18 *= 0.94f;
15119 }
15120 }
15121 if (num17 != airLightDecay)
15122 {
15123 if (airLightDecay >= num17)
15124 {
15125 airLightDecay -= 0.005f;
15126 if (airLightDecay < num17)
15127 {
15129 }
15130 }
15131 else
15132 {
15133 airLightDecay += 0.005f;
15134 if (airLightDecay > num17)
15135 {
15137 }
15138 }
15139 }
15140 if (num18 != solidLightDecay)
15141 {
15142 if (solidLightDecay >= num18)
15143 {
15144 solidLightDecay -= 0.005f;
15145 if (solidLightDecay < num18)
15146 {
15148 }
15149 }
15150 else
15151 {
15152 solidLightDecay += 0.005f;
15153 if (solidLightDecay > num18)
15154 {
15156 }
15157 }
15158 }
15159 bool flag6 = ZoneRain && ZoneSnow;
15160 if (Main.remixWorld)
15161 {
15162 flag6 = (double)(position.Y / 16f) > Main.worldSurface && Main.raining && ZoneSnow;
15163 }
15164 bool flag7 = point.Y > Main.maxTilesY - 320;
15165 bool flag2 = ZoneOverworldHeight && (point.X < 380 || point.X > Main.maxTilesX - 380);
15167 ManageSpecialBiomeVisuals("Stardust", ZoneTowerStardust, vector4 - new Vector2(0f, 10f));
15168 ManageSpecialBiomeVisuals("Nebula", ZoneTowerNebula, vector3 - new Vector2(0f, 10f));
15169 ManageSpecialBiomeVisuals("Vortex", ZoneTowerVortex, vector2 - new Vector2(0f, 10f));
15170 ManageSpecialBiomeVisuals("Solar", ZoneTowerSolar, vector - new Vector2(0f, 10f));
15171 ManageSpecialBiomeVisuals("MoonLord", NPC.AnyNPCs(398));
15172 ManageSpecialBiomeVisuals("BloodMoon", Main.bloodMoon || Main.SceneMetrics.BloodMoonMonolith || bloodMoonMonolithShader);
15173 ManageSpecialBiomeVisuals("Blizzard", Main.UseStormEffects && flag6);
15174 ManageSpecialBiomeVisuals("HeatDistortion", Main.UseHeatDistortion && (flag7 || ((double)point.Y < Main.worldSurface && ZoneDesert && !flag2 && !Main.raining && !Filters.Scene["Sandstorm"].IsActive())));
15175 if (Main.GraveyardVisualIntensity > 0f)
15176 {
15177 if (!Filters.Scene["Graveyard"].IsActive())
15178 {
15179 Filters.Scene.Activate("Graveyard", default(Vector2));
15180 }
15181 else
15182 {
15183 Filters.Scene["Graveyard"].GetShader().UseTargetPosition(base.Center);
15184 float progress = MathHelper.Lerp(0f, 0.75f, Main.GraveyardVisualIntensity);
15185 Filters.Scene["Graveyard"].GetShader().UseProgress(progress);
15186 Filters.Scene["Graveyard"].GetShader().UseIntensity(1.2f);
15187 }
15188 }
15189 else if (Filters.Scene["Graveyard"].IsActive())
15190 {
15191 Filters.Scene.Deactivate("Graveyard");
15192 }
15193 if (!Filters.Scene["Sepia"].IsActive() && dontStarveShader)
15194 {
15195 Filters.Scene.Activate("Sepia", default(Vector2));
15196 }
15197 else if (Filters.Scene["Sepia"].IsActive() && !dontStarveShader)
15198 {
15199 Filters.Scene.Deactivate("Sepia");
15200 }
15201 if (!Filters.Scene["WaterDistortion"].IsActive() && Main.WaveQuality > 0)
15202 {
15203 Filters.Scene.Activate("WaterDistortion", default(Vector2));
15204 }
15205 else if (Filters.Scene["WaterDistortion"].IsActive() && Main.WaveQuality == 0)
15206 {
15207 Filters.Scene.Deactivate("WaterDistortion");
15208 }
15209 if (Filters.Scene["WaterDistortion"].IsActive())
15210 {
15211 float num21 = (float)Main.maxTilesX * 0.5f - Math.Abs((float)point.X - (float)Main.maxTilesX * 0.5f);
15212 float num2 = 1f;
15213 float num3 = Math.Abs(Main.windSpeedCurrent);
15214 num2 += num3 * 1.25f;
15215 float num4 = MathHelper.Clamp(Main.maxRaining, 0f, 1f);
15216 num2 += num4 * 1.25f;
15217 float num5 = 0f - (MathHelper.Clamp((num21 - 380f) / 100f, 0f, 1f) * 0.5f - 0.25f);
15218 num2 += num5;
15219 float num6 = 1f - MathHelper.Clamp(3f * ((float)((double)point.Y - Main.worldSurface) / (float)(Main.rockLayer - Main.worldSurface)), 0f, 1f);
15220 num2 *= num6;
15221 float num7 = 0.9f - MathHelper.Clamp((float)(Main.maxTilesY - point.Y - 200) / 300f, 0f, 1f) * 0.9f;
15222 num2 += num7;
15223 num2 += (1f - num6) * 0.75f;
15224 num2 = MathHelper.Clamp(num2, 0f, 2.5f);
15225 Filters.Scene["WaterDistortion"].GetShader().UseIntensity(num2);
15226 }
15227 if (flag7)
15228 {
15229 float val = (float)(point.Y - (Main.maxTilesY - 320)) / 120f;
15230 val = Math.Min(1f, val) * 2f;
15231 Filters.Scene["HeatDistortion"].GetShader().UseIntensity(val);
15232 }
15233 _shaderObstructionInternalValue = Utils.Clamp(_shaderObstructionInternalValue + (float)behindBackWall.ToDirectionInt() * -0.005f, -0.1f, 1.1f);
15235 if (Filters.Scene["Sandstorm"].IsActive())
15236 {
15237 Filters.Scene["Sandstorm"].GetShader().UseIntensity(_stormShaderObstruction * 0.4f * Math.Min(1f, Sandstorm.Severity));
15238 Filters.Scene["Sandstorm"].GetShader().UseOpacity(Math.Min(1f, Sandstorm.Severity * 1.5f) * _stormShaderObstruction);
15239 ((SimpleOverlay)Overlays.Scene["Sandstorm"]).GetShader().UseOpacity(Math.Min(1f, Sandstorm.Severity * 1.5f) * (1f - _stormShaderObstruction));
15240 }
15241 else if (ZoneDesert && !flag2 && !Main.raining && !flag7)
15242 {
15243 Vector3 vector5 = ((Color)(ref Main.tileColor)).ToVector3();
15244 float num8 = (vector5.X + vector5.Y + vector5.Z) / 3f;
15245 float num9 = _stormShaderObstruction * 4f * Math.Max(0f, 0.5f - Main.cloudAlpha) * num8;
15246 Filters.Scene["HeatDistortion"].GetShader().UseIntensity(num9);
15247 if (num9 <= 0f)
15248 {
15249 Filters.Scene["HeatDistortion"].IsHidden = true;
15250 }
15251 else
15252 {
15253 Filters.Scene["HeatDistortion"].IsHidden = false;
15254 }
15255 }
15257 {
15258 try
15259 {
15260 if (flag6)
15261 {
15262 float cloudAlpha = Main.cloudAlpha;
15263 if (Main.remixWorld)
15264 {
15265 Main.cloudAlpha = 0.4f;
15266 }
15267 bool value = NPC.IsADeerclopsNearScreen();
15268 _deerclopsBlizzardSmoothedEffect = MathHelper.Clamp(_deerclopsBlizzardSmoothedEffect + (float)value.ToDirectionInt() * 0.0033333334f, 0f, 1f);
15269 float num10 = Math.Min(1f, Main.cloudAlpha * 2f) * _stormShaderObstruction;
15270 float num11 = _stormShaderObstruction * 0.4f * Math.Min(1f, Main.cloudAlpha * 2f) * 0.9f + 0.1f;
15273 Filters.Scene["Blizzard"].GetShader().UseIntensity(num11);
15274 Filters.Scene["Blizzard"].GetShader().UseOpacity(num10);
15275 ((SimpleOverlay)Overlays.Scene["Blizzard"]).GetShader().UseOpacity(1f - num10);
15276 if (Main.remixWorld)
15277 {
15278 Main.cloudAlpha = cloudAlpha;
15279 }
15280 }
15281 }
15282 catch
15283 {
15285 }
15286 }
15288 {
15289 try
15290 {
15291 if (flag6)
15292 {
15295 if (activeSound5 == null)
15296 {
15298 }
15299 if (activeSound2 == null)
15300 {
15302 }
15305 }
15306 if (flag6)
15307 {
15309 }
15310 else
15311 {
15313 }
15314 float num13 = Math.Min(1f, Main.cloudAlpha * 2f) * _stormShaderObstruction;
15317 if (_blizzardSoundVolume > 0f)
15318 {
15319 if (activeSound3 == null)
15320 {
15323 }
15324 activeSound3.Volume = num13 * _blizzardSoundVolume;
15325 if (activeSound4 == null)
15326 {
15329 }
15330 activeSound4.Volume = (1f - num13) * _blizzardSoundVolume;
15331 }
15332 else
15333 {
15334 if (activeSound3 != null)
15335 {
15336 activeSound3.Volume = 0f;
15337 }
15338 else
15339 {
15340 _strongBlizzardSound = SlotId.Invalid;
15341 }
15342 if (activeSound4 != null)
15343 {
15344 activeSound4.Volume = 0f;
15345 }
15346 else
15347 {
15348 _insideBlizzardSound = SlotId.Invalid;
15349 }
15350 }
15351 }
15352 catch
15353 {
15354 disabledBlizzardSound = true;
15355 }
15356 }
15358 if (!dead)
15359 {
15360 Point point2 = base.Center.ToTileCoordinates();
15361 if (WorldGen.InWorld(point2.X, point2.Y, 1))
15362 {
15363 int num14 = 0;
15364 if (Main.tile[point2.X, point2.Y] != null)
15365 {
15366 num14 = Main.tile[point2.X, point2.Y].wall;
15367 }
15368 switch (num14)
15369 {
15370 case 86:
15372 break;
15373 case 62:
15375 break;
15376 }
15377 }
15379 {
15381 }
15382 if (Main.specialSeedWorld)
15383 {
15385 }
15386 if (position.Y / 16f > (float)Main.UnderworldLayer)
15387 {
15389 }
15390 else if (_funkytownAchievementCheckCooldown == 0 && (double)(position.Y / 16f) < Main.worldSurface && ZoneGlowshroom)
15391 {
15393 }
15395 {
15397 }
15398 }
15399 else
15400 {
15402 }
15403 LoaderManager.Get<SceneEffectLoader>().UpdateSceneEffect(this);
15404 }
static ? ActiveSound GetActiveSound(SlotId slotId)
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
float Distance(Vector2 Other)
Definition Entity.cs:275
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
static void HandleSpecialEvent(Player player, int eventID)
static FilterManager Scene
Definition Filters.cs:5
static OverlayManager Scene
Definition Overlays.cs:5
static readonly SoundStyle BlizzardStrongLoop
Definition SoundID.cs:51
static readonly SoundStyle BlizzardInsideBuildingLoop
Definition SoundID.cs:49
This serves as the central class from which SceneEffect functions are supported and carried out.
float _deerclopsBlizzardSmoothedEffect
Definition Player.cs:3165
static float solidLightDecay
Definition Player.cs:3163
bool bloodMoonMonolithShader
Definition Player.cs:2235
bool ZonePurity
The zone property storing if the player is not in any particular biome. Updated in M:Terraria....
Definition Player.cs:4619
float _stormShaderObstruction
Definition Player.cs:3155
void UpdateGraveyard(bool now=false)
Definition Player.cs:14729
float _shaderObstructionInternalValue
Definition Player.cs:3157
bool ZoneUndergroundDesert
Definition Player.cs:3932
bool ZoneWaterCandle
Definition Player.cs:3836
bool ZoneDirtLayerHeight
If true, then this player is underground (F:Terraria.Main.worldSurface) but above the Caverns layer (...
Definition Player.cs:3978
bool ZoneSkyHeight
If true, then this player is the top 35% of the world. NOTE: Vanilla uses a lot of different condit...
Definition Player.cs:3948
bool CanSeeShimmerEffects()
Definition Player.cs:14780
bool ZoneUnderworldHeight
If true, then this player is in the Underworld (P:Terraria.Main.UnderworldLayer).
Definition Player.cs:4008
int _funkytownAchievementCheckCooldown
Definition Player.cs:3153
bool ZoneTowerNebula
Definition Player.cs:3884
bool ZonePeaceCandle
Definition Player.cs:3848
static float airLightDecay
Definition Player.cs:3161
static bool disabledBlizzardSound
Definition Player.cs:1021
bool ZoneGraveyard
Definition Player.cs:4128
bool ZoneOverworldHeight
If true, then this player is above ground (F:Terraria.Main.worldSurface) but not in space (P:Terraria...
Definition Player.cs:3963
void ManageSpecialBiomeVisuals(string biomeName, bool inZone, Vector2 activationSource=default(Vector2))
Definition Player.cs:15415
bool ZoneLihzhardTemple
Definition Player.cs:4116
bool luckNeedsSync
Definition Player.cs:3213
bool ZoneTowerVortex
Definition Player.cs:3872
bool ZoneSandstorm
Definition Player.cs:4044
bool ZoneTowerStardust
Definition Player.cs:3896
bool dontStarveShader
Definition Player.cs:2209
bool ZoneGlowshroom
Definition Player.cs:3920
bool ZoneRockLayerHeight
If true, then this player is in the Caverns layer (F:Terraria.Main.rockLayer) but not in the Underwor...
Definition Player.cs:3993
bool ZoneShadowCandle
Definition Player.cs:4140
bool ZoneOldOneArmy
Definition Player.cs:4056
static float _blizzardSoundVolume
Definition Player.cs:1023
bool behindBackWall
Definition Player.cs:3151
void UpdateBiomes()
Definition Player.cs:14801
bool HasGardenGnomeNearby
Definition Player.cs:2275
static bool disabledBlizzardGraphic
Definition Player.cs:1019
bool ZoneTowerSolar
Definition Player.cs:3860
bool InZonePurity()
Calculates whether or not the player is in the purity/forest biome.
Definition Player.cs:58516
static SlotId _strongBlizzardSound
Definition Player.cs:1025
static SlotId _insideBlizzardSound
Definition Player.cs:1027

References Terraria.Player._blizzardSoundVolume, Terraria.Player._deerclopsBlizzardSmoothedEffect, Terraria.Player._funkytownAchievementCheckCooldown, Terraria.Player._insideBlizzardSound, Terraria.Player._shaderObstructionInternalValue, Terraria.Player._stormShaderObstruction, Terraria.Player._strongBlizzardSound, Terraria.Player.airLightDecay, Terraria.NPC.AnyNPCs(), Terraria.Player.behindBackWall, Terraria.ID.SoundID.BlizzardInsideBuildingLoop, Terraria.ID.SoundID.BlizzardStrongLoop, Terraria.Main.bloodMoon, Terraria.Player.bloodMoonMonolithShader, Terraria.Player.CanSeeShimmerEffects(), Terraria.Main.cloudAlpha, Terraria.Player.dead, Terraria.Player.disabledBlizzardGraphic, Terraria.Player.disabledBlizzardSound, Terraria.Entity.Distance(), Terraria.Player.dontStarveShader, Terraria.NPC.FindFirstNPC(), Terraria.Audio.SoundEngine.GetActiveSound(), Terraria.Main.getGoodWorld, Terraria.Framing.GetTileSafely(), Terraria.Main.GraveyardVisualIntensity, Terraria.GameContent.Achievements.AchievementsHelper.HandleSpecialEvent(), Terraria.GameContent.Events.Sandstorm.Happening, Terraria.ID.WallID.Sets.Conversion.HardenedSand, Terraria.Player.HasGardenGnomeNearby, Terraria.WorldGen.InWorld(), Terraria.Player.InZonePurity(), Terraria.NPC.IsADeerclopsNearScreen(), Terraria.Player.luckNeedsSync, Terraria.Player.ManageSpecialBiomeVisuals(), Terraria.Main.maxRaining, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.npc, Terraria.WorldGen.oceanDepths(), Terraria.Audio.SoundEngine.PlayTrackedSound(), Terraria.Entity.position, Terraria.Main.raining, Terraria.Main.remixWorld, Terraria.Main.rockLayer, Terraria.ID.WallID.Sets.Conversion.Sandstone, Terraria.Graphics.Effects.Filters.Scene, Terraria.Graphics.Effects.Overlays.Scene, Terraria.Main.SceneMetrics, Terraria.Main.screenPosition, Terraria.GameContent.Events.Sandstorm.Severity, Terraria.Main.shimmerAlpha, Terraria.Main.shimmerBrightenDelay, Terraria.Main.shimmerDarken, Terraria.Player.solidLightDecay, Terraria.Main.specialSeedWorld, Terraria.Main.tile, Terraria.Main.tileColor, Terraria.Main.UnderworldLayer, Terraria.Player.UpdateBiomes(), Terraria.Player.UpdateGraveyard(), Terraria.Main.UseHeatDistortion, Terraria.Main.UseStormEffects, Terraria.Main.wallDungeon, Terraria.Main.WaveQuality, Terraria.Main.windSpeedCurrent, Terraria.Main.worldSurface, Terraria.Player.ZoneBeach, Terraria.Player.ZoneCorrupt, Terraria.Player.ZoneCrimson, Terraria.Player.ZoneDesert, Terraria.Player.ZoneDirtLayerHeight, Terraria.Player.ZoneDungeon, Terraria.Player.ZoneGemCave, Terraria.Player.ZoneGlowshroom, Terraria.Player.ZoneGranite, Terraria.Player.ZoneGraveyard, Terraria.Player.ZoneHallow, Terraria.Player.ZoneHive, Terraria.Player.ZoneJungle, Terraria.Player.ZoneLihzhardTemple, Terraria.Player.ZoneMarble, Terraria.Player.ZoneMeteor, Terraria.Player.ZoneOldOneArmy, Terraria.Player.ZoneOverworldHeight, Terraria.Player.ZonePeaceCandle, Terraria.Player.ZonePurity, Terraria.Player.ZoneRain, Terraria.Player.ZoneRockLayerHeight, Terraria.Player.ZoneSandstorm, Terraria.Player.ZoneShadowCandle, Terraria.Player.ZoneShimmer, Terraria.Player.ZoneSkyHeight, Terraria.Player.ZoneSnow, Terraria.Player.ZoneTowerNebula, Terraria.Player.ZoneTowerSolar, Terraria.Player.ZoneTowerStardust, Terraria.Player.ZoneTowerVortex, Terraria.Player.ZoneUndergroundDesert, Terraria.Player.ZoneUnderworldHeight, and Terraria.Player.ZoneWaterCandle.

Referenced by Terraria.Player.ForceUpdateBiomes(), Terraria.Player.Update(), and Terraria.Player.UpdateBiomes().

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