Merge pull request #1606 from CalamityTeam/pulse-fix
Pulse Pistol/Rifle now work with Band accessories
This commit is contained in:
3 files changed
+8
-4
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user