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

◆ IsPlayerSafe()

static bool Terraria.GameContent.DontStarveDarknessDamageDealer.IsPlayerSafe ( Player player)
inlinestaticprivate

Definition at line 99 of file DontStarveDarknessDamageDealer.cs.

100 {
101 Vector3 vector = Lighting.GetColor((int)player.Center.X / 16, (int)player.Center.Y / 16).ToVector3();
102 bool flag = true;
103 if (Main.LocalGolfState != null && (Main.LocalGolfState.ShouldCameraTrackBallLastKnownLocation || Main.LocalGolfState.IsTrackingBall))
104 {
106 }
107 if (Main.DroneCameraTracker != null && Main.DroneCameraTracker.IsInUse())
108 {
110 }
111 return vector.Length() >= 0.1f;
112 }

References Terraria.Entity.Center, Terraria.Main.DroneCameraTracker, Terraria.Lighting.GetColor(), Terraria.GameContent.DontStarveDarknessDamageDealer.lastFrameWasTooBright, Microsoft.Xna.Framework.Vector3.Length(), Terraria.Main.LocalGolfState, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.

Referenced by Terraria.GameContent.DontStarveDarknessDamageDealer.UpdateDarknessState().