Add DisableTombstones

This commit is contained in:
Deathmax 2011-12-04 15:55:20 +08:00
parent 77b9fcaf98
commit 28c4f9ed9c
3 changed files with 13 additions and 2 deletions

View file

@ -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<Projectile, int> e)
{
if (e.Info == 43)
if (Config.DisableTombstones)
e.Object.SetDefaults(0);
}
/// <summary>
/// Send bytes to client using packetbuffering if available
/// </summary>