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

◆ Collision_MoveSolarSroller()

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

Definition at line 109880 of file NPC.cs.

109881 {
109882 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
109883 //IL_0003: Unknown result type (might be due to invalid IL or missing references)
109884 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
109885 //IL_0013: Unknown result type (might be due to invalid IL or missing references)
109886 //IL_0028: Unknown result type (might be due to invalid IL or missing references)
109887 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
109888 velocity = Collision.TileCollision(cPosition, velocity, cWidth, cHeight, fall, fall);
109889 if (ai[0] != 6f || !(velocity != oldVelocity))
109890 {
109891 return;
109892 }
109893 ai[2] -= 1f;
109894 ai[3] = 1f;
109895 if (ai[2] > 0f)
109896 {
109897 if (velocity.X != 0f && velocity.X != oldVelocity.X)
109898 {
109899 velocity.X = (0f - oldVelocity.X) * 0.9f;
109900 direction *= -1;
109901 }
109902 if (velocity.Y != 0f && velocity.Y != oldVelocity.Y)
109903 {
109904 velocity.Y = (0f - oldVelocity.Y) * 0.9f;
109905 }
109906 }
109907 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 oldVelocity
Definition Entity.cs:37
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
Definition NPC.cs:997

References Terraria.Collision.TileCollision().

+ Here is the call graph for this function: