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

◆ LaunchRocket()

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

Definition at line 56379 of file WorldGen.cs.

56380 {
56381 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
56382 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
56383 int num = Main.tile[x, y].frameY;
56384 int num2 = 0;
56385 while (num >= 40)
56386 {
56387 num -= 40;
56388 num2++;
56389 }
56390 if (num == 18)
56391 {
56392 y--;
56393 }
56394 Vector2 vector = default(Vector2);
56395 ((Vector2)(ref vector))._002Ector((float)(x * 16 + 8), (float)(y * 16 + 4));
56396 int type = 167 + num2;
56397 int damage = 150;
56398 int num3 = 7;
56399 int num4 = Projectile.NewProjectile(GetProjectileSource_PlayerOrWires(x, y, fromWiring, Main.LocalPlayer), vector.X, vector.Y + 2f, 0f, -8f, type, damage, num3, Main.myPlayer);
56400 Main.projectile[num4].originatedFromActivableTile = true;
56401 Main.tile[x, y].active(active: false);
56402 Main.tile[x, y + 1].active(active: false);
56403 NetMessage.SendTileSquare(-1, x, y, 1, 2);
56404 }
static IEntitySource GetProjectileSource_PlayerOrWires(int x, int y, bool fromWiring, Player player)
Definition WorldGen.cs:1577

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

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

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