Update players when they die to hopefully stop their items floating at their grave

This commit is contained in:
Chris 2019-03-30 16:31:20 +10:30
parent 34a4ef3b7d
commit ad28771e2c

View file

@ -2860,14 +2860,6 @@ namespace TShockAPI
var type = Main.projectile[index].type;
// Players can no longer destroy projectiles that are not theirs as of 1.1.2
/*if (args.Player.Index != Main.projectile[index].owner && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill) // workaround for skeletron prime projectiles
{
args.Player.Disable(String.Format("Owner ({0}) and player ID ({1}) does not match to kill projectile of type: {3}", Main.projectile[index].owner, args.Player.Index, type));
args.Player.RemoveProjectile(ident, owner);
return true;
}*/
if (TShock.CheckIgnores(args.Player))
{
args.Player.RemoveProjectile(ident, owner);
@ -2955,6 +2947,8 @@ namespace TShockAPI
}
}
//Attempt to resolve issue where player's slected items sometime fail to stop rendering when they die (eg chainsaws)
NetMessage.SendData((int)PacketTypes.PlayerUpdate, -1, args.Player.Index, NetworkText.Empty, args.Player.Index);
return false;
}