Clean up all projectile code.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Pets;
|
||||
@@ -7,7 +8,7 @@ public class FoxPet : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.CloneDefaults(111);
|
||||
Projectile.CloneDefaults(ProjectileID.Bunny);
|
||||
AIType = 111;
|
||||
Main.projFrames[Projectile.type] = 8;
|
||||
Projectile.width = 70;
|
||||
@@ -28,9 +29,9 @@ public class FoxPet : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.foxPet = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user