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

◆ PlaceThing_CannonBall()

void Terraria.Player.PlaceThing_CannonBall ( )
inlineprivate

Definition at line 40503 of file Player.cs.

40504 {
40505 if ((inventory[selectedItem].type == 929 || inventory[selectedItem].type == 1338 || inventory[selectedItem].type == 1345) && position.X / 16f - (float)tileRangeX - (float)inventory[selectedItem].tileBoost - (float)blockRange <= (float)tileTargetX && (position.X + (float)width) / 16f + (float)tileRangeX + (float)inventory[selectedItem].tileBoost - 1f + (float)blockRange >= (float)tileTargetX && position.Y / 16f - (float)tileRangeY - (float)inventory[selectedItem].tileBoost - (float)blockRange <= (float)tileTargetY && (position.Y + (float)height) / 16f + (float)tileRangeY + (float)inventory[selectedItem].tileBoost - 2f + (float)blockRange >= (float)tileTargetY)
40506 {
40507 int num = tileTargetX;
40508 int num2 = tileTargetY;
40509 if (Main.tile[num, num2].active() && Main.tile[num, num2].type == 209)
40510 {
40512 }
40513 }
40514 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
int tileBoost
Additional tile range provided by this tool or tile. Copper Pickaxe has a value of -1,...
Definition Item.cs:429
static int tileTargetY
Definition Player.cs:2652
static int tileRangeX
Definition Player.cs:2642
void ShootFromCannon(int x, int y)
Definition Player.cs:40745
static int tileTargetX
Definition Player.cs:2650
static int tileRangeY
Definition Player.cs:2644
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
Definition Player.cs:1767

References Terraria.Player.blockRange, Terraria.Entity.height, Terraria.Player.inventory, Terraria.Entity.position, Terraria.Player.selectedItem, Terraria.Player.ShootFromCannon(), Terraria.Main.tile, Terraria.Item.tileBoost, Terraria.Player.tileRangeX, Terraria.Player.tileRangeY, Terraria.Player.tileTargetX, Terraria.Player.tileTargetY, and Terraria.Entity.width.

Referenced by Terraria.Player.PlaceThing().

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