Merge pull request #1606 from CalamityTeam/pulse-fix

Pulse Pistol/Rifle now work with Band accessories
This commit is contained in:
CongratsIsTrash authored and GitHub committed 2026-08-06 10:27:59 -04:00
commit 360fb29ee2
3 files changed
+8 -4

No files matched your search

-2
View File
@@ -358,8 +358,6 @@ namespace CalamityMod.CalPlayer
if (generalBandCooldown == 0)
{
int cooldown = 0;
// NOTE: Apparently Pulse Pistol/Pulse Rifle projectiles will set spawned projectiles here to inherit the proj ID???
// No clue why this happens or how to fix it, but it just breaks using multiple band types together on these two weapons
if (bGlassBand)
{
int damage = (int)Player.GetBestClassDamage().ApplyTo(BlackGlassBand.damage);
@@ -38,6 +38,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void AI()
{
if (timesItCanHit <= 0)
return;
Lighting.AddLight(Projectile.Center, Effects.ArsenalEffects.ArsenalPulseColor.ToVector3() * 0.5f);
Player Owner = Main.player[Projectile.owner];
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center);
@@ -194,7 +197,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
pulseOrb2.penetrate = 1;
pulseOrb2.scale = 0.7f;
}
Projectile.Kill();
Projectile.timeLeft = 1; // Stagger the kill to allow band accessories to work. There's a separate check that prevents AI from running while timesItCanHit is 0
}
}
public override bool PreDraw(ref Color lightColor)
@@ -44,6 +44,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void AI()
{
if (timesItCanHit <= 0)
return;
Player Owner = Main.player[Projectile.owner];
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center);
@@ -247,7 +250,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
}
// If it's hit targeted enemies enough, kill it
if (timesItCanHit <= 0)
Projectile.Kill();
Projectile.timeLeft = 1; // Stagger the kill to allow band accessories to work. There's a separate check that prevents AI from running while timesItCanHit is 0
}
public override bool PreDraw(ref Color lightColor)