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

◆ RemoveIntersectingPortals()

static void Terraria.GameContent.PortalHelper.RemoveIntersectingPortals ( Vector2 position,
float angle )
inlinestaticprivate

Definition at line 530 of file PortalHelper.cs.

531 {
532 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
533 //IL_0030: Unknown result type (might be due to invalid IL or missing references)
534 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
535 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
536 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
537 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
538 GetPortalEdges(position, angle, out var start, out var end);
539 for (int i = 0; i < 1000; i++)
540 {
541 Projectile projectile = Main.projectile[i];
542 if (!projectile.active || projectile.type != 602)
543 {
544 continue;
545 }
546 GetPortalEdges(projectile.Center, projectile.ai[0], out var start2, out var end2);
547 if (Collision.CheckLinevLine(start, end, start2, end2).Length != 0)
548 {
549 if (projectile.owner != Main.myPlayer && Main.netMode != 2)
550 {
551 NetMessage.SendData(95, -1, -1, null, projectile.owner, (int)projectile.ai[1]);
552 }
553 projectile.Kill();
554 }
555 }
556 }
static void GetPortalEdges(Vector2 position, float angle, out Vector2 start, out Vector2 end)

References Terraria.Entity.active, Terraria.Projectile.ai, Terraria.Entity.Center, Terraria.Collision.CheckLinevLine(), Terraria.GameContent.PortalHelper.GetPortalEdges(), Terraria.Projectile.Kill(), Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.NetMessage.SendData(), and Terraria.Projectile.type.

Referenced by Terraria.GameContent.PortalHelper.AddPortal().

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