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

◆ Collision_MoveWhileWet()

void Terraria.NPC.Collision_MoveWhileWet ( Vector2 oldDryVelocity,
float Slowdown = 0::5f )
inlineprivate

Definition at line 109946 of file NPC.cs.

109947 {
109948 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
109949 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
109950 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
109951 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
109952 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
109953 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
109954 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
109955 //IL_0096: Unknown result type (might be due to invalid IL or missing references)
109956 //IL_009b: Unknown result type (might be due to invalid IL or missing references)
109957 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
109958 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
109959 if (Collision.up)
109960 {
109961 velocity.Y = 0.01f;
109962 }
109963 Vector2 vector = velocity * Slowdown;
109964 if (velocity.X != oldDryVelocity.X)
109965 {
109966 vector.X = velocity.X;
109967 collideX = true;
109968 }
109969 if (velocity.Y != oldDryVelocity.Y)
109970 {
109971 vector.Y = velocity.Y;
109972 collideY = true;
109973 }
109976 position += vector;
109977 }
Vector2 oldPosition
Definition Entity.cs:35
int oldDirection
Definition Entity.cs:39
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
bool collideX
Definition NPC.cs:1134
bool collideY
Definition NPC.cs:1136

References Terraria.Collision.up.