More Atlas Munitions changes
the held cannon can no longer just fall down platforms stupid bugfix #6
This commit is contained in:
1 parent
11f4ab20a0
commit
8d4d329f5a
2 files changed
+12
No files matched your search
@@ -189,6 +189,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile heldCannon = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Main.LocalPlayer.Center, Vector2.UnitX, ModContent.ProjectileType<AtlasMunitionsAutocannonHeld>(), Projectile.damage, Projectile.knockBack, Main.myPlayer);
|
||||
heldCannon.ModProjectile<AtlasMunitionsAutocannonHeld>().HeatInterpolant = HeatInterpolant * 0.65f;
|
||||
heldCannon.originalDamage = Projectile.originalDamage;
|
||||
heldCannon.ai[2] = Projectile.ai[2];
|
||||
|
||||
CannonIsMounted = false;
|
||||
Projectile.netUpdate = true;
|
||||
|
||||
@@ -192,6 +192,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.owner = Main.myPlayer;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
|
||||
// Destroy the cannon if the pod (base sentry) got replaced by other sentries
|
||||
Projectile parent = Main.projectile[(int)Projectile.ai[2]];
|
||||
if (parent.type != ModContent.ProjectileType<AtlasMunitionsDropPod>() || !parent.active)
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public void DetermineFrames()
|
||||
@@ -328,6 +333,12 @@ namespace CalamityMod.Projectiles.Summon
|
||||
// The cannon does not get destroyed by tile collisions. This only applies when in the dropped state.
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
|
||||
{
|
||||
fallThrough = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// The cannon itself does not do damage, but it does store damage for the lasers that it fires.
|
||||
public override bool? CanDamage() => false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user