Definition at line 40194 of file NPC.cs.
40195 {
40196 if (!Main.IsItAHappyWindyDay &&
timeLeft > 10)
40197 {
40199 }
40200 bool flag = false;
40201 float num = 0f;
40206 {
40208 float windSpeedCurrent = Main.windSpeedCurrent;
40209 num = (float)
hitbox.Center.X -
base.Center.X;
40211 flag =
Math.
Abs((
float)
hitbox.Center.Y -
base.Center.Y) < 100f &&
num2 < 600f && ((num > 0f && windSpeedCurrent > 0f) || (num < 0f && windSpeedCurrent < 0f));
40212 }
40214 {
40217 {
40219 }
40220 if (Main.netMode == 1)
40221 {
40222 return;
40223 }
40224 if (!flag)
40225 {
40228 }
40229 else
40230 {
40232 {
40233 return;
40234 }
40237 {
40240 }
40241 else
40242 {
40244 {
40245 return;
40246 }
40247 for (
int i = 0;
i < 1 + Main.rand.Next(3);
i++)
40248 {
40250 if (num > 0f)
40251 {
40253 }
40258 {
40259 vector2.Y = -3f;
40260 }
40262 vector3.X +=
num3 * 6;
40265 }
40267 }
40268 }
40269 }
40270 else if (
ai[0] == 0f)
40271 {
40274 if (Main.netMode != 1 && flag)
40275 {
40278 }
40279 }
40280 }
static double Abs(double value)
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
IEntitySource GetSpawnSource_ForProjectile()
static void TargetClosestDownwindFromNPC(NPC searcher, float distanceMaxX, bool faceTarget=true, Vector2? checkPosition=null)
References System.Math.Abs(), Terraria.NPC.ai, Terraria.NPC.GetSpawnSource_ForProjectile(), Terraria.NPC.GetTargetData(), Terraria.Main.IsItAHappyWindyDay, Terraria.NPC.localAI, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.NPC.netUpdate, Terraria.Projectile.NewProjectile(), Terraria.Main.rand, Terraria.NPC.target, Terraria.Utilities.NPCUtils.TargetClosestDownwindFromNPC(), Terraria.NPC.timeLeft, Microsoft.Xna.Framework.Graphics.Vector2, and Terraria.Main.windSpeedCurrent.
Referenced by Terraria.NPC.AI().