fixed spiky balls not properly getting deleted
This commit is contained in:
1 parent
db73d455d5
commit
e7f4b0fc4c
4 files changed
+12
-25
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user