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

◆ ItemCheck_UseMiningTools_TryHittingWall()

void Terraria.Player.ItemCheck_UseMiningTools_TryHittingWall ( Item sItem,
int wX,
int wY )
inlineprivate

Definition at line 43688 of file Player.cs.

43689 {
43690 if (Main.tile[wX, wY].wall > 0 && (!Main.tile[wX, wY].active() || wX != tileTargetX || wY != tileTargetY || (!Main.tileHammer[Main.tile[wX, wY].type] && !poundRelease)) && toolTime == 0 && itemAnimation > 0 && controlUseItem && sItem.hammer > 0 && CanPlayerSmashWall(wX, wY))
43691 {
43692 int damage = (int)((float)sItem.hammer * 1.5f);
43693 PickWall(wX, wY, damage);
43694 itemTime = sItem.useTime / 2;
43695 }
43696 }
bool poundRelease
Definition Player.cs:1185
static bool CanPlayerSmashWall(int X, int Y)
Definition Player.cs:43698
static int tileTargetY
Definition Player.cs:2085
void PickWall(int x, int y, int damage)
Definition Player.cs:43719
static int tileTargetX
Definition Player.cs:2083
bool controlUseItem
Definition Player.cs:1391

References Terraria.Main.tile, and Terraria.Main.tileHammer.