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

◆ TryBeginningFlight()

void Terraria.Mount.TryBeginningFlight ( Player mountedPlayer,
int state )
inline

Definition at line 4173 of file Mount.cs.

4174 {
4175 //IL_0032: Unknown result type (might be due to invalid IL or missing references)
4176 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
4177 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
4178 //IL_0044: Unknown result type (might be due to invalid IL or missing references)
4179 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
4180 //IL_0058: Unknown result type (might be due to invalid IL or missing references)
4181 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
4182 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
4183 if (_frameState == state || (state != 2 && state != 3) || !CanHover() || mountedPlayer.controlUp || mountedPlayer.controlDown || mountedPlayer.controlJump)
4184 {
4185 return;
4186 }
4187 Vector2 velocity = Vector2.UnitY * mountedPlayer.gravDir;
4188 if (Collision.TileCollision(mountedPlayer.position + new Vector2(0f, -0.001f), velocity, mountedPlayer.width, mountedPlayer.height, fallThrough: false, fall2: false, (int)mountedPlayer.gravDir).Y != 0f)
4189 {
4191 {
4192 mountedPlayer.position.Y += -0.001f;
4193 return;
4194 }
4195 float num = mountedPlayer.gravity * mountedPlayer.gravDir;
4196 mountedPlayer.position.Y -= mountedPlayer.velocity.Y;
4197 mountedPlayer.velocity.Y -= num;
4198 }
4199 }
bool DoesHoverIgnoresFatigue()
Definition Mount.cs:3176
bool CanHover()
Definition Mount.cs:2440
int _frameState
Definition Mount.cs:304

References Terraria.Mount._frameState, Terraria.Mount.CanHover(), Terraria.Mount.DoesHoverIgnoresFatigue(), and Terraria.Collision.TileCollision().

Referenced by Terraria.Player.PlayerFrame().

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