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

◆ LaunchRocket()

static void Terraria.WorldGen.LaunchRocket ( int x,
int y,
bool fromWiring )
inlinestatic

Definition at line 52850 of file WorldGen.cs.

52851 {
52852 int num = Main.tile[x, y].frameY;
52853 int num2 = 0;
52854 while (num >= 40)
52855 {
52856 num -= 40;
52857 num2++;
52858 }
52859 if (num == 18)
52860 {
52861 y--;
52862 }
52863 Vector2 vector = new Vector2(x * 16 + 8, y * 16 + 4);
52864 int type = 167 + num2;
52865 int damage = 150;
52866 int num3 = 7;
52867 int num4 = Projectile.NewProjectile(GetProjectileSource_PlayerOrWires(x, y, fromWiring, Main.LocalPlayer), vector.X, vector.Y + 2f, 0f, -8f, type, damage, num3, Main.myPlayer);
52868 Main.projectile[num4].originatedFromActivableTile = true;
52869 Main.tile[x, y].active(active: false);
52870 Main.tile[x, y + 1].active(active: false);
52871 NetMessage.SendTileSquare(-1, x, y, 1, 2);
52872 }
static IEntitySource GetProjectileSource_PlayerOrWires(int x, int y, bool fromWiring, Player player)
Definition WorldGen.cs:1333

References Terraria.Main.LocalPlayer, Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.projectile, Terraria.NetMessage.SendTileSquare(), Terraria.Main.tile, and System.type.

Referenced by Terraria.Wiring.HitWireSingle(), and Terraria.Player.TileInteractionsUse().