public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource) { if (this.player.whoAmI != Main.myPlayer) { return; } if (Main.netMode == NetmodeID.MultiplayerClient && pvp) { TerrariaMobaUtils.MobaKill(damageSource.SourcePlayerIndex); } else { TerrariaMobaUtils.MobaKill(PlayerLastHurt); } }
public int GetYPos() { int posX = (int)projectile.Bottom.X; int posY = (int)projectile.Bottom.Y; if (TerrariaMobaUtils.TileIsSolidOrPlatform(posX / 16, posY / 16)) { while (TerrariaMobaUtils.TileIsSolidOrPlatform(posX / 16, posY / 16)) { posY -= 1; } } else { while (!TerrariaMobaUtils.TileIsSolidOrPlatform(posX / 16, posY / 16)) { posY += 1; } } return(posY); }