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

◆ WaterCollision()

void Terraria.Player.WaterCollision ( bool fallThrough,
bool ignorePlats )
inline

Definition at line 21645 of file Player.cs.

21646 {
21647 //IL_001b: Unknown result type (might be due to invalid IL or missing references)
21648 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
21649 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
21650 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
21651 //IL_003e: Unknown result type (might be due to invalid IL or missing references)
21652 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
21653 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
21654 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
21655 //IL_0058: Unknown result type (might be due to invalid IL or missing references)
21656 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
21657 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
21658 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
21659 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
21660 //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
21661 //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
21662 int num = ((!onTrack) ? height : (height - 20));
21663 Vector2 vector = velocity;
21664 velocity = Collision.TileCollision(position, velocity, width, num, fallThrough, ignorePlats, (int)gravDir);
21665 Vector2 vector2 = velocity * 0.5f;
21666 if (velocity.X != vector.X)
21667 {
21668 vector2.X = velocity.X;
21669 }
21670 if (velocity.Y != vector.Y)
21671 {
21672 vector2.Y = velocity.Y;
21673 }
21674 position += vector2;
21676 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
void TryFloatingInFluid()
Definition Player.cs:21678

References Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Player.onTrack, Terraria.Entity.position, Terraria.Collision.TileCollision(), Terraria.Player.TryFloatingInFluid(), Terraria.Entity.velocity, and Terraria.Entity.width.

Referenced by Terraria.Player.Update().

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