Tried to fix weird Ghastly Visage and Grand Staff bug.
This commit is contained in:
1 parent
bfa0b7bac4
commit
5d2f3c4ec7
2 files changed
+20
-6
No files matched your search
@@ -87,11 +87,13 @@ namespace CalamityMod.Projectiles.Magic
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
flag15 = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
flag15 = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -104,7 +106,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
Projectile.localAI[1] += 1f;
|
||||
Projectile.soundDelay = num40 - num41 * num39;
|
||||
SoundEngine.PlaySound(SoundID.Item117, Projectile.position);
|
||||
|
||||
if (flag15)
|
||||
SoundEngine.PlaySound(SoundID.Item117, Projectile.position);
|
||||
}
|
||||
else if (Projectile.soundDelay <= 0 && flag16)
|
||||
{
|
||||
@@ -121,11 +125,13 @@ namespace CalamityMod.Projectiles.Magic
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
flag15 = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
flag15 = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -137,7 +143,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
Projectile.soundDelay = num40 - num41 * num39;
|
||||
if (Projectile.ai[0] != 1f)
|
||||
if (Projectile.ai[0] != 1f && flag15)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item117, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.ai[0] = 0f;
|
||||
|
||||
bool shoot = CurrentFrame == ShootFrame && Projectile.ai[0] == 0f;
|
||||
bool ableToShoot = true;
|
||||
bool weaponInUse = Owner.channel && !Owner.noItems && !Owner.CCed;
|
||||
int manaCost = (int)(30f * Owner.manaCost);
|
||||
Vector2 halvedSize = Projectile.Size / 2f;
|
||||
@@ -74,30 +75,37 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Owner.manaFlower)
|
||||
{
|
||||
Owner.QuickMana();
|
||||
if (Owner.statMana >= (int)(float)manaCost)
|
||||
if (Owner.statMana >= manaCost)
|
||||
{
|
||||
Owner.manaRegenDelay = (int)Owner.maxRegenDelay;
|
||||
Owner.statMana -= manaCost;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
ableToShoot = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.Kill();
|
||||
ableToShoot = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Owner.statMana >= (int)(float)manaCost)
|
||||
if (Owner.statMana >= manaCost)
|
||||
{
|
||||
Owner.statMana -= manaCost;
|
||||
Owner.manaRegenDelay = (int)Owner.maxRegenDelay;
|
||||
}
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item117, Projectile.position);
|
||||
if (ableToShoot)
|
||||
SoundEngine.PlaySound(SoundID.Item117, Projectile.position);
|
||||
}
|
||||
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
if (Main.myPlayer == Projectile.owner && ableToShoot)
|
||||
{
|
||||
int projectileType = ModContent.ProjectileType<NebulaCloudCore>();
|
||||
float coreVelocity = 8f;
|
||||
|
||||
Reference in new issue
Block a user