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

◆ CanShowVisuals()

virtual bool Terraria.ModLoader.ExtraJump.CanShowVisuals ( Player player)
inlinevirtualinherited

Return false to prevent M:Terraria.ModLoader.ExtraJump.ShowVisuals(Terraria.Player) from executing.
By default, this hook returns whether the player is moving upwards with respect to F:Terraria.Player.gravDir

Parameters
playerThe player performing the jump

Definition at line 129 of file ExtraJump.cs.

130 {
131 if (player.gravDir != 1f || !(player.velocity.Y < 0f))
132 {
133 if (player.gravDir == -1f)
134 {
135 return player.velocity.Y > 0f;
136 }
137 return false;
138 }
139 return true;
140 }

References Terraria.Player.gravDir, and Terraria.Entity.velocity.

Referenced by Terraria.ModLoader.ExtraJumpLoader.JumpVisuals().

+ Here is the caller graph for this function: