diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc632514..ad559311 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Changed hook `GetDataHandlers.OnNewProjectile` so that it passes the projectile's AI (by updating `NewProjectileEventArgs` and parsing this during the TShock hook) to support processing projectile AI in bouncer. (@AgaSpace)
* Fixed an issue where certain projectiles could be sent to the server with uncapped size parameters, which resulted in large disruptive client artifacts that could be used to grief players. (@AgaSpace, @Arthri)
* Added the currently running value of `Main.GameMode` to `/worldmode` as "Mode". (@hakusaro)
+* Fixed the ability to spawn Zenith projectile with non-original items. (@AgaSpace)
## TShock 4.5.10
* Changed the server behavior when `SIGINT` is received. When `SIGINT` is trapped, the server will attempt to shut down safely. When it is trapped a second time in a session, it will immediately exit. (`SIGINT` is typically triggered via CTRL + C.) This means that it is possible to corrupt your world if you force shutdown at the wrong time (e.g., while the world is saving), but hopefully you expect this to happen if you hit CTRL + C twice in a session and you read the warning. (@hakusaro, @Onusai)
diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs
index 7795ed64..2145b373 100644
--- a/TShockAPI/Bouncer.cs
+++ b/TShockAPI/Bouncer.cs
@@ -1096,7 +1096,21 @@ namespace TShockAPI
return;
}
-
+ /*
+ * ai - Arguments that Projectile.AI uses for easier projectile control.
+ * ai[0] - Distance from player (Doesn't affect the result very much)
+ * ai[1] - The identifier of the object that will fly.
+ *
+ * FinalFractalHelper._fractalProfiles - A list of items that must be used in Zenith. (And also their colors)
+ * If you add an item to this collection, it will also fly in the Zenith. (not active from server)
+ */
+ if (TShock.Config.Settings.DisableModifiedZenith && type == ProjectileID.FinalFractal && (ai[0] < -100 || ai[0] > 101) && !Terraria.Graphics.FinalFractalHelper._fractalProfiles.ContainsKey((int)ai[1]))
+ {
+ TShock.Log.ConsoleDebug("Bouncer / OnNewProjectile rejected from bouncer modified Zenith projectile from {0}.", args.Player.Name);
+ args.Player.RemoveProjectile(ident, owner);
+ args.Handled = true;
+ return;
+ }
if (!args.Player.HasPermission(Permissions.ignoreprojectiledetection))
{
diff --git a/TShockAPI/Configuration/TShockConfig.cs b/TShockAPI/Configuration/TShockConfig.cs
index eeb658c1..2c643fab 100644
--- a/TShockAPI/Configuration/TShockConfig.cs
+++ b/TShockAPI/Configuration/TShockConfig.cs
@@ -456,6 +456,10 @@ namespace TShockAPI.Configuration
/// Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.
[Description("Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.")]
public bool SuppressPermissionFailureNotices = false;
+
+ /// Prohibit the use of Zenith projectile with different objects instead of weapons.
+ [Description("Prohibit the use of Zenith projectile with different objects instead of weapons.")]
+ public bool DisableModifiedZenith = false;
#endregion