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

◆ CheckAABBvLineCollision() [1/2]

static bool Terraria.Collision.CheckAABBvLineCollision ( Vector2 aabbPosition,
Vector2 aabbDimensions,
Vector2 lineStart,
Vector2 lineEnd )
inlinestatic

Definition at line 308 of file Collision.cs.

309 {
310 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
311 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
312 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
313 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
314 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
315 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
316 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
317 //IL_001d: Unknown result type (might be due to invalid IL or missing references)
318 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
319 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
320 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
321 //IL_009f: Unknown result type (might be due to invalid IL or missing references)
322 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
323 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
324 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
325 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
326 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
327 //IL_0051: Unknown result type (might be due to invalid IL or missing references)
328 //IL_0057: Unknown result type (might be due to invalid IL or missing references)
329 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
330 int num;
332 {
333 return true;
334 }
335 int num2;
337 {
338 if ((num2 & num) != 0)
339 {
340 return false;
341 }
342 if (((uint)num2 & 5u) != 0)
343 {
344 float num3 = aabbPosition.X;
345 if (((uint)num2 & 4u) != 0)
346 {
347 num3 += aabbDimensions.X;
348 }
349 lineStart.Y += (num3 - lineStart.X) * (lineEnd.Y - lineStart.Y) / (lineEnd.X - lineStart.X);
350 lineStart.X = num3;
351 }
352 else
353 {
354 float num4 = aabbPosition.Y;
355 if (((uint)num2 & 8u) != 0)
356 {
357 num4 += aabbDimensions.Y;
358 }
359 lineStart.X += (num4 - lineStart.Y) * (lineEnd.X - lineStart.X) / (lineEnd.Y - lineStart.Y);
360 lineStart.Y = num4;
361 }
362 }
363 return true;
364 }
static int collisionOutcode(Vector2 aabbPosition, Vector2 aabbDimensions, Vector2 point)
Definition Collision.cs:264

References Terraria.Collision.collisionOutcode().

Referenced by Terraria.Collision.CheckAABBvLineCollision2(), Terraria.Projectile.Colliding(), and Terraria.GameContent.PortalHelper.TryGoingThroughPortals().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: