113 {
114 if (Collision.LavaCollision(testPosition, width, height))
115 {
116 return true;
117 }
118 if (Collision.AnyHurtingTiles(testPosition, width, height))
119 {
120 return true;
121 }
122 if (Collision.SolidCollision(testPosition, width, height))
123 {
124 return true;
125 }
126 Vector2 vector = Vector2.UnitX * 16f;
127 if (Collision.TileCollision(testPosition - vector, vector, width, height, fallThrough: false, fall2: false, gravDir) != vector)
128 {
129 return true;
130 }
131 vector = -Vector2.UnitX * 16f;
132 if (Collision.TileCollision(testPosition - vector, vector, width, height, fallThrough: false, fall2: false, gravDir) != vector)
133 {
134 return true;
135 }
136 vector = Vector2.UnitY * 16f;
137 if (Collision.TileCollision(testPosition - vector, vector, width, height, fallThrough: false, fall2: false, gravDir) != vector)
138 {
139 return true;
140 }
141 vector = -Vector2.UnitY * 16f;
142 if (Collision.TileCollision(testPosition - vector, vector, width, height, fallThrough: false, fall2: false, gravDir) != vector)
143 {
144 return true;
145 }
146 return false;
147 }