16068 {
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089 Point point =
base.Center.ToTileCoordinates();
16091 if (Main.SceneMetrics.DungeonTileCount >= 250 && (
double)
base.Center.Y > Main.worldSurface * 16.0)
16092 {
16093 int num = (int)
base.Center.X / 16;
16094 int num2 = (int)
base.Center.Y / 16;
16095 if (Main.tile[num,
num2] !=
null && Main.wallDungeon[Main.tile[num,
num2].wall])
16096 {
16098 }
16099 }
16101 int num3 = (int)
base.Center.X / 16;
16102 int num4 = (int)
base.Center.Y / 16;
16104 {
16106 }
16109 {
16111 }
16113 {
16115 {
16117 }
16118 }
16119 else
16120 {
16122 }
16124 {
16126 }
16127 else
16128 {
16130 }
16132 {
16134 }
16135 else
16136 {
16138 }
16140 {
16142 }
16143 else
16144 {
16146 }
16148 {
16150 }
16151 else
16152 {
16154 }
16155 bool flag = (double)(Main.screenPosition.Y / 16f) > Main.worldSurface + 50.0 && Main.screenPosition.Y / 16f < (float)(Main.maxTilesY - 330 - 100);
16156 ZoneShimmer = Main.SceneMetrics.EnoughTilesForShimmer && flag;
16157 ZoneCorrupt = Main.SceneMetrics.EnoughTilesForCorruption;
16158 ZoneCrimson = Main.SceneMetrics.EnoughTilesForCrimson;
16159 ZoneHallow = Main.SceneMetrics.EnoughTilesForHallow;
16160 ZoneJungle = Main.SceneMetrics.EnoughTilesForJungle && position.Y / 16f < (float)Main.UnderworldLayer;
16161 ZoneSnow = Main.SceneMetrics.EnoughTilesForSnow;
16162 ZoneDesert = Main.SceneMetrics.EnoughTilesForDesert;
16163 ZoneGlowshroom = Main.SceneMetrics.EnoughTilesForGlowingMushroom;
16164 ZoneMeteor = Main.SceneMetrics.EnoughTilesForMeteor;
16171 {
16174 }
16176 ZoneRockLayerHeight = point.Y <= Main.UnderworldLayer && (double)point.Y > Main.rockLayer;
16177 ZoneDirtLayerHeight = (double)point.Y <= Main.rockLayer && (
double)point.Y > Main.worldSurface;
16178 ZoneOverworldHeight = (double)point.Y <= Main.worldSurface && (
double)point.Y > Main.worldSurface * 0.3499999940395355;
16179 ZoneSkyHeight = (double)point.Y <= Main.worldSurface * 0.3499999940395355;
16181 ZoneRain = Main.raining && (double)point.Y <= Main.worldSurface;
16182 if (Main.remixWorld)
16183 {
16185 }
16186 else
16187 {
16189 }
16200 for (
int i = 0;
i < 200;
i++)
16201 {
16202 if (!Main.npc[i].active)
16203 {
16204 continue;
16205 }
16206 if (Main.npc[i].type == 493)
16207 {
16208 if (
Distance(Main.npc[i].Center) <= 4000f)
16209 {
16212 }
16213 }
16214 else if (Main.npc[i].type == 507)
16215 {
16216 if (
Distance(Main.npc[i].Center) <= 4000f)
16217 {
16220 }
16221 }
16222 else if (Main.npc[i].type == 422)
16223 {
16224 if (
Distance(Main.npc[i].Center) <= 4000f)
16225 {
16228 }
16229 }
16230 else if (Main.npc[i].type == 517)
16231 {
16232 if (
Distance(Main.npc[i].Center) <= 4000f)
16233 {
16236 }
16237 }
16238 else if (Main.npc[i].type == 549 &&
Distance(Main.npc[i].Center) <= 4000f)
16239 {
16242 }
16243 }
16246 float num7 = Main.shimmerAlpha;
16248 {
16252 {
16255 {
16257 }
16258 }
16260 {
16261 Main.shimmerDarken =
MathHelper.
Clamp(Main.shimmerDarken + 0.025f, 0f, 1f);
16262 Main.shimmerBrightenDelay = 4f;
16263 }
16264 }
16265 else if (
num7 > 0f)
16266 {
16267 Main.shimmerDarken =
MathHelper.
Clamp(Main.shimmerDarken - 0.05f, 0f, 1f);
16268 if (Main.shimmerDarken == 0f && Main.shimmerBrightenDelay > 0f)
16269 {
16270 Main.shimmerBrightenDelay -= 1f;
16271 }
16272 if (Main.shimmerBrightenDelay == 0f)
16273 {
16275 }
16277 {
16279 }
16280 }
16281 Main.shimmerAlpha =
num7;
16282 if (Main.getGoodWorld)
16283 {
16284 bool flag7 =
false;
16285 int num8 =
NPC.FindFirstNPC(245);
16287 {
16289 }
16291 {
16294 }
16296 {
16299 }
16301 {
16304 }
16305 }
16307 {
16309 {
16312 {
16314 }
16315 }
16316 else
16317 {
16320 {
16322 }
16323 }
16324 }
16326 {
16328 {
16331 {
16333 }
16334 }
16335 else
16336 {
16339 {
16341 }
16342 }
16343 }
16345 if (Main.remixWorld)
16346 {
16348 }
16349 bool flag9 = point.Y > Main.maxTilesY - 320;
16359 if (Main.GraveyardVisualIntensity > 0f)
16360 {
16362 {
16364 }
16365 else
16366 {
16370 Filters.
Scene[
"Graveyard"].GetShader().UseIntensity(1.2f);
16371 }
16372 }
16374 {
16376 }
16378 {
16380 }
16382 {
16384 }
16385 if (!
Filters.
Scene[
"WaterDistortion"].IsActive() && Main.WaveQuality > 0)
16386 {
16388 }
16389 else if (
Filters.
Scene[
"WaterDistortion"].IsActive() && Main.WaveQuality == 0)
16390 {
16392 }
16394 {
16395 float num9 = (float)Main.maxTilesX * 0.5f -
Math.
Abs((
float)point.X - (float)Main.maxTilesX * 0.5f);
16403 float num14 = 1f -
MathHelper.
Clamp(3f * ((
float)((
double)point.Y - Main.worldSurface) / (
float)(Main.rockLayer - Main.worldSurface)), 0f, 1f);
16405 float num15 = 0.9f -
MathHelper.
Clamp((
float)(Main.maxTilesY - point.Y - 200) / 300f, 0f, 1f) * 0.9f;
16410 }
16412 {
16413 float val = (float)(point.Y - (Main.maxTilesY - 320)) / 120f;
16414 val =
Math.
Min(1f, val) * 2f;
16415 Filters.
Scene[
"HeatDistortion"].GetShader().UseIntensity(val);
16416 }
16420 {
16424 }
16426 {
16428 float num16 = (vector5.X + vector5.Y +
vector5.Z) / 3f;
16432 {
16434 }
16435 else
16436 {
16438 }
16439 }
16441 {
16442 try
16443 {
16445 {
16446 float cloudAlpha = Main.cloudAlpha;
16447 if (Main.remixWorld)
16448 {
16449 Main.cloudAlpha = 0.4f;
16450 }
16451 bool value =
NPC.IsADeerclopsNearScreen();
16460 if (Main.remixWorld)
16461 {
16462 Main.cloudAlpha = cloudAlpha;
16463 }
16464 }
16465 }
16466 catch
16467 {
16469 }
16470 }
16472 {
16473 try
16474 {
16476 {
16480 {
16482 }
16484 {
16486 }
16489 }
16491 {
16493 }
16494 else
16495 {
16497 }
16502 {
16504 {
16507 }
16510 {
16513 }
16515 }
16516 else
16517 {
16519 {
16520 activeSound3.Volume = 0f;
16521 }
16522 else
16523 {
16525 }
16527 {
16528 activeSound4.Volume = 0f;
16529 }
16530 else
16531 {
16533 }
16534 }
16535 }
16536 catch
16537 {
16539 }
16540 }
16542 {
16545 {
16548 {
16550 }
16552 {
16553 case 86:
16555 break;
16556 case 62:
16558 break;
16559 }
16560 }
16562 {
16564 }
16565 if (Main.specialSeedWorld)
16566 {
16568 }
16569 if (
position.
Y / 16f > (
float)Main.UnderworldLayer)
16570 {
16572 }
16574 {
16576 }
16578 {
16580 }
16581 }
16582 else
16583 {
16585 }
16586 }
static float Lerp(float value1, float value2, float amount)
static float Clamp(float value, float min, float max)
static byte Min(byte val1, byte val2)
static double Abs(double value)
static byte Max(byte val1, byte val2)
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
static ActiveSound GetActiveSound(SlotId id)
float Distance(Vector2 Other)
static void HandleSpecialEvent(Player player, int eventID)
static FilterManager Scene
static OverlayManager Scene
static readonly LegacySoundStyle BlizzardStrongLoop
static readonly LegacySoundStyle BlizzardInsideBuildingLoop
static bool[] HardenedSand
float _deerclopsBlizzardSmoothedEffect
static float solidLightDecay
bool bloodMoonMonolithShader
float _stormShaderObstruction
void UpdateGraveyard(bool now=false)
float _shaderObstructionInternalValue
bool ZoneUndergroundDesert
bool CanSeeShimmerEffects()
bool ZoneUnderworldHeight
int _funkytownAchievementCheckCooldown
static float airLightDecay
static bool disabledBlizzardSound
void ManageSpecialBiomeVisuals(string biomeName, bool inZone, Vector2 activationSource=default(Vector2))
static float _blizzardSoundVolume
bool HasGardenGnomeNearby
static bool disabledBlizzardGraphic
static SlotId _strongBlizzardSound
static SlotId _insideBlizzardSound
static float Distance(Vector2 value1, Vector2 value2)
static readonly SlotId Invalid