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

◆ LaunchRocketSmall()

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

Definition at line 52874 of file WorldGen.cs.

52875 {
52876 if (Main.tile[x, y].frameX == 18)
52877 {
52878 x--;
52879 }
52880 if (Main.tile[x, y].frameY == 18)
52881 {
52882 y--;
52883 }
52884 Vector2 vector = new Vector2(x * 16 + 16, y * 16);
52885 int type = 415 + Main.rand.Next(4);
52886 int damage = 0;
52887 int num = 0;
52888 int num2 = Projectile.NewProjectile(GetProjectileSource_PlayerOrWires(x, y, fromWiring, Main.LocalPlayer), vector.X, vector.Y + 2f, 0f, -8f, type, damage, num, Main.myPlayer);
52889 Main.projectile[num2].originatedFromActivableTile = true;
52890 }
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.Main.rand, Terraria.Main.tile, and System.type.

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