diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 49859e55..5021743f 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -199,6 +199,9 @@ namespace TShockAPI [Description("This is the port which the rest api will listen on.")] public int RestApiPort = 7878; + [Description("Disable tombstones for all players.")] + public bool DisableTombstones = true; + public static ConfigFile Read(string path) { if (!File.Exists(path)) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 8182e641..88b96d40 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.3.4.1203")] -[assembly: AssemblyFileVersion("3.3.4.1203")] +[assembly: AssemblyVersion("3.3.4.1204")] +[assembly: AssemblyFileVersion("3.3.4.1204")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 9a743968..11ecd871 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -195,6 +195,7 @@ namespace TShockAPI NetHooks.SendData += NetHooks_SendData; NetHooks.GreetPlayer += OnGreetPlayer; NpcHooks.StrikeNpc += NpcHooks_OnStrikeNpc; + ProjectileHooks.SetDefaults += OnProjectileSetDefaults; GetDataHandlers.InitGetDataHandler(); Commands.InitCommands(); @@ -707,6 +708,13 @@ namespace TShockAPI } } + void OnProjectileSetDefaults(SetDefaultsEventArgs e) + { + if (e.Info == 43) + if (Config.DisableTombstones) + e.Object.SetDefaults(0); + } + /// /// Send bytes to client using packetbuffering if available ///