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

◆ GetWitchBroomTrinketRotation()

float Terraria.Mount.GetWitchBroomTrinketRotation ( Player player)
inlineprivate

Definition at line 3185 of file Mount.cs.

3186 {
3187 //IL_0028: Unknown result type (might be due to invalid IL or missing references)
3188 //IL_002d: Unknown result type (might be due to invalid IL or missing references)
3189 //IL_0032: Unknown result type (might be due to invalid IL or missing references)
3190 //IL_0039: Unknown result type (might be due to invalid IL or missing references)
3191 //IL_003f: Unknown result type (might be due to invalid IL or missing references)
3192 float num = Utils.Clamp(player.velocity.X / 10f, -1f, 1f);
3193 float num2 = 0f;
3194 Point point = player.Center.ToTileCoordinates();
3195 float num3 = 0.5f;
3196 if (WorldGen.InAPlaceWithWind(point.X, point.Y, 1, 1))
3197 {
3198 num3 = 1f;
3199 }
3200 num2 = (float)Math.Sin((float)player.miscCounter / 300f * ((float)Math.PI * 2f) * 3f) * ((float)Math.PI / 4f) * Math.Abs(Main.WindForVisuals) * 0.5f + (float)Math.PI / 4f * (0f - Main.WindForVisuals) * 0.5f;
3201 num2 *= num3;
3202 return num * (float)Math.Sin((float)player.miscCounter / 150f * ((float)Math.PI * 2f) * 3f) * ((float)Math.PI / 4f) * 0.5f + num * ((float)Math.PI / 4f) * 0.5f + num2;
3203 }

References Terraria.Entity.Center, Terraria.WorldGen.InAPlaceWithWind(), Terraria.Entity.velocity, and Terraria.Main.WindForVisuals.

Referenced by Terraria.Mount.Draw(), and Terraria.Mount.UpdateEffects().

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