Fixed desync problem of plantera thorn balls (#71)
This commit is contained in:
1 parent
9044fdfe68
commit
f938644f2f
2 files changed
+7
-6
No files matched your search
@@ -270,9 +270,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer);
|
||||
if (projectileType == ProjectileID.ThornBall && (Main.rand.NextBool() || !Main.zenithWorld))
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
float ai2 = projectileType == ProjectileID.ThornBall && (Main.rand.NextBool() || !Main.zenithWorld) ? 1f : 0f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer, 0f, 0f, ai2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -882,9 +881,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * projectileSpeed, type, damage, 0f, Main.myPlayer);
|
||||
float ai2 = 0f;
|
||||
if (Main.rand.NextBool() || !Main.zenithWorld)
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
ai2 = 1f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * projectileSpeed, type, damage, 0f, Main.myPlayer, 0f, 0f, ai2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2665,8 +2665,9 @@ namespace CalamityMod.Projectiles
|
||||
return false;
|
||||
}
|
||||
|
||||
else if (projectile.type == ProjectileID.ThornBall && !projectile.tileCollide)
|
||||
else if (projectile.type == ProjectileID.ThornBall && projectile.ai[2] != 0)
|
||||
{
|
||||
projectile.tileCollide = false;
|
||||
if (projectile.alpha > 0)
|
||||
{
|
||||
projectile.alpha -= 30;
|
||||
|
||||
Reference in new issue
Block a user