fixed spiky balls not properly getting deleted

This commit is contained in:
termigator1359 committed 2020-05-28 10:42:00 -04:00
1 parent db73d455d5
commit e7f4b0fc4c
4 files changed
+12 -25

No files matched your search

+3 -6
View File
@@ -69,12 +69,7 @@ Right click to delete all existing spiky balls");
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = false;
if (player.altFunctionUse == 2)
{
modPlayer.killSpikyBalls = true;
return false;
}
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
@@ -85,6 +80,8 @@ Right click to delete all existing spiky balls");
public override bool AltFunctionUse(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = true;
return true;
}
+3 -7
View File
@@ -65,17 +65,11 @@ namespace CalamityMod.Items.Weapons.Rogue
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = false;
if (player.altFunctionUse == 2)
{
modPlayer.killSpikyBalls = true;
return false;
}
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<HellsSunProj>(), (int)(damage * SdamageMult), knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
@@ -88,6 +82,8 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool AltFunctionUse(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = true;
return true;
}
+3 -6
View File
@@ -65,12 +65,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = false;
if (player.altFunctionUse == 2)
{
modPlayer.killSpikyBalls = true;
return false;
}
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
@@ -81,6 +76,8 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool AltFunctionUse(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = true;
return true;
}
+3 -6
View File
@@ -65,12 +65,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = false;
if (player.altFunctionUse == 2)
{
modPlayer.killSpikyBalls = true;
return false;
}
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<SkyStabberProj>(), damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
@@ -81,6 +76,8 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool AltFunctionUse(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = true;
return true;
}