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

◆ Collision_MoveStardustCell()

void Terraria.NPC.Collision_MoveStardustCell ( bool fall,
Vector2 cPosition,
int cWidth,
int cHeight )
inlineprivate

Definition at line 109909 of file NPC.cs.

109910 {
109911 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
109912 //IL_0003: Unknown result type (might be due to invalid IL or missing references)
109913 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
109914 //IL_0013: Unknown result type (might be due to invalid IL or missing references)
109915 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
109916 //IL_001f: Unknown result type (might be due to invalid IL or missing references)
109917 velocity = Collision.TileCollision(cPosition, velocity, cWidth, cHeight, fall, fall);
109918 if (velocity != oldVelocity)
109919 {
109920 if (velocity.X != 0f && velocity.X != oldVelocity.X)
109921 {
109922 velocity.X = (0f - oldVelocity.X) * 0.8f;
109923 }
109924 if (velocity.Y != 0f && velocity.Y != oldVelocity.Y)
109925 {
109926 velocity.Y = (0f - oldVelocity.Y) * 0.8f;
109927 }
109928 }
109929 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 oldVelocity
Definition Entity.cs:37

References Terraria.Collision.TileCollision().

+ Here is the call graph for this function: