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

◆ DemonConch()

void Terraria.Player.DemonConch ( )
inline

Definition at line 52596 of file Player.cs.

52597 {
52598 bool canSpawn = false;
52599 int num = Main.maxTilesX / 2;
52600 int num2 = 100;
52601 int num3 = num2 / 2;
52602 int teleportStartY = Main.UnderworldLayer + 20;
52603 int teleportRangeY = 80;
52604 RandomTeleportationAttemptSettings settings = new RandomTeleportationAttemptSettings
52605 {
52606 mostlySolidFloor = true,
52607 avoidAnyLiquid = true,
52608 avoidLava = true,
52609 avoidHurtTiles = true,
52610 avoidWalls = true,
52611 attemptsBeforeGivingUp = 1000,
52612 maximumFallDistanceFromOrignalPoint = 30
52613 };
52615 if (!canSpawn)
52616 {
52618 }
52619 if (!canSpawn)
52620 {
52622 }
52623 if (canSpawn)
52624 {
52626 Teleport(newPos, 7);
52628 if (Main.netMode == 2)
52629 {
52630 RemoteClient.CheckSection(whoAmI, position);
52631 NetMessage.SendData(65, -1, -1, null, 0, whoAmI, newPos.X, newPos.Y, 7);
52632 }
52633 }
52634 else
52635 {
52637 Teleport(newPos2, 7);
52639 if (Main.netMode == 2)
52640 {
52641 RemoteClient.CheckSection(whoAmI, position);
52642 NetMessage.SendData(65, -1, -1, null, 0, whoAmI, newPos2.X, newPos2.Y, 7, 1);
52643 }
52644 }
52645 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
void Teleport(Vector2 newPos, int Style=0, int extraInfo=0)
Definition Player.cs:35567
Vector2 CheckForGoodTeleportationSpot(ref bool canSpawn, int teleportStartX, int teleportRangeX, int teleportStartY, int teleportRangeY, RandomTeleportationAttemptSettings settings)
Definition Player.cs:52685

References Terraria.RemoteClient.CheckSection(), Terraria.Main.netMode, Terraria.NetMessage.SendData(), and Microsoft.Xna.Framework.Vector2.Zero.