17494 {
17495 if (
whoAmI != Main.myPlayer)
17496 {
17497 return;
17498 }
17499 if ((
double)
position.
Y < Main.worldSurface * 16.0)
17500 {
17502 return;
17503 }
17507 {
17508 return;
17509 }
17511 int num = 0;
17517 int num3 = Utils.Clamp(
value, 10, Main.maxTilesX - 10);
17518 value2 = Utils.Clamp(
value2, 10, Main.maxTilesX - 10);
17519 value3 = Utils.Clamp(
value3, 10, Main.maxTilesY - 10);
17520 value4 = Utils.Clamp(
value4, 10, Main.maxTilesY - 10);
17522 {
17524 {
17525 Tile tile = Main.tile[
i,
j];
17526 if (tile != null && (tile.active() & (tile.type == 4)) && tile.frameX < 66)
17527 {
17530 num++;
17532 {
17533 break;
17534 }
17535 }
17536 }
17538 {
17539 break;
17540 }
17541 }
17543 {
17546 if (Main.netMode == 1)
17547 {
17548 NetMessage.SendData(4, -1, -1,
null,
whoAmI);
17549 }
17551 {
17553 if (Main.netMode == 1)
17554 {
17555 NetMessage.SendData(21, -1, -1,
null,
number, 1f);
17556 }
17557 }
17558 }
17559 else
17560 {
17561 if (num <= 0)
17562 {
17563 return;
17564 }
17565 int num4 = Main.rand.Next(num);
17569 {
17573 {
17575 }
17578 Main.tile[
num5,
num6].frameX += 66;
17582 NetMessage.SendTileSquare(-1,
num5,
num6);
17591 Main.projectile[
num11].netUpdate =
true;
17593 {
17595 }
17596 }
17597 }
17598 }
static float Clamp(float value, float min, float max)
static readonly short Count
static int[] _torchAttackPosX
static int[] _torchAttackPosY
void EndOngoingTorchGodEvent()
IEntitySource GetProjectileSource_Misc(int projectileSourceId)
int numberOfTorchAttacksMade
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
static int maxTorchAttacks