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

◆ FindCollisionDirection()

static bool Terraria.Collision.FindCollisionDirection ( out int Direction,
Vector2 position,
int Width,
int Height,
bool fallThrough = false,
bool fall2 = false,
int gravDir = 1 )
inlinestatic

Definition at line 3009 of file Collision.cs.

3010 {
3011 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
3012 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
3013 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
3014 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
3015 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
3016 //IL_0012: Unknown result type (might be due to invalid IL or missing references)
3017 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
3018 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
3019 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
3020 //IL_0032: Unknown result type (might be due to invalid IL or missing references)
3021 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
3022 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
3023 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
3024 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
3025 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
3026 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
3027 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
3028 //IL_0057: Unknown result type (might be due to invalid IL or missing references)
3029 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
3030 //IL_0069: Unknown result type (might be due to invalid IL or missing references)
3031 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
3032 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
3033 //IL_0079: Unknown result type (might be due to invalid IL or missing references)
3034 //IL_007a: Unknown result type (might be due to invalid IL or missing references)
3035 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
3036 //IL_0080: Unknown result type (might be due to invalid IL or missing references)
3037 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
3038 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
3039 //IL_009b: Unknown result type (might be due to invalid IL or missing references)
3040 //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
3041 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
3042 //IL_00af: Unknown result type (might be due to invalid IL or missing references)
3043 //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
3044 //IL_00b1: Unknown result type (might be due to invalid IL or missing references)
3045 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
3046 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
3047 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
3048 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
3049 Vector2 vector = Vector2.UnitX * 16f;
3050 if (TileCollision(position - vector, vector, Width, Height, fallThrough, fall2, gravDir) != vector)
3051 {
3052 Direction = 0;
3053 return true;
3054 }
3055 vector = -Vector2.UnitX * 16f;
3056 if (TileCollision(position - vector, vector, Width, Height, fallThrough, fall2, gravDir) != vector)
3057 {
3058 Direction = 1;
3059 return true;
3060 }
3061 vector = Vector2.UnitY * 16f;
3062 if (TileCollision(position - vector, vector, Width, Height, fallThrough, fall2, gravDir) != vector)
3063 {
3064 Direction = 2;
3065 return true;
3066 }
3067 vector = -Vector2.UnitY * 16f;
3068 if (TileCollision(position - vector, vector, Width, Height, fallThrough, fall2, gravDir) != vector)
3069 {
3070 Direction = 3;
3071 return true;
3072 }
3073 Direction = -1;
3074 return false;
3075 }
static Vector2 TileCollision(Vector2 Position, Vector2 Velocity, int Width, int Height, bool fallThrough=false, bool fall2=false, int gravDir=1)

References Terraria.Collision.TileCollision().

+ Here is the call graph for this function: