Clean up all projectile code.

This commit is contained in:
Big Duckie
2022-07-05 22:32:27 -06:00
parent 2b34d060c5
commit 099f0a2e50
73 changed files with 651 additions and 840 deletions
+1 -2
View File
@@ -42,11 +42,10 @@ public class CarbonKnife : ModProjectile
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Vector2 position = Projectile.position;
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
_ = position + rotVector * 16f;
int item = 0;
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
{
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.KillProjectile);
}
}
}
+1 -2
View File
@@ -42,11 +42,10 @@ public class CarbonKnifeNihon : ModProjectile
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Vector2 position = Projectile.position;
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
_ = position + rotVector * 16f;
int item = 0;
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
{
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.KillProjectile);
}
}
}
+1 -2
View File
@@ -42,11 +42,10 @@ public class DeathBlossom : ModProjectile
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Vector2 position = Projectile.position;
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
_ = position + rotVector * 16f;
int item = 0;
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
{
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.KillProjectile);
}
}
}
+3 -4
View File
@@ -55,10 +55,9 @@ public class FumaShuriken : ModProjectile
}
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>(), 0f, 0f, 0, default, 1f);
Dust obj = Main.dust[num1];
obj.velocity *= 0f;
Main.dust[num1].noGravity = true;
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>());
Main.dust[dust].velocity *= 0f;
Main.dust[dust].noGravity = true;
}
}
+1 -2
View File
@@ -42,11 +42,10 @@ public class GoldenKnife : ModProjectile
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Vector2 position = Projectile.position;
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
_ = position + rotVector * 16f;
int item = 0;
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
{
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.KillProjectile);
}
}
}
+1 -2
View File
@@ -42,11 +42,10 @@ public class RainbowKnife : ModProjectile
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Vector2 position = Projectile.position;
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
_ = position + rotVector * 16f;
int item = 0;
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
{
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.KillProjectile);
}
}
}