Attempt another invis fix

Drops HP packets which have the current HP <= 0. Also removes some
unused TSPlayer fields.
This commit is contained in:
MarioE 2013-11-30 09:07:09 -05:00
parent 02820c0172
commit 652425c4ba
2 changed files with 2 additions and 6 deletions

View file

@ -1319,7 +1319,7 @@ namespace TShockAPI
var cur = args.Data.ReadInt16(); var cur = args.Data.ReadInt16();
var max = args.Data.ReadInt16(); var max = args.Data.ReadInt16();
if (OnPlayerHP(plr, cur, max)) if (OnPlayerHP(plr, cur, max) || cur <= 0)
return true; return true;
if (args.Player.FirstMaxHP == 0) if (args.Player.FirstMaxHP == 0)
@ -1328,7 +1328,7 @@ namespace TShockAPI
if (cur < 0 || cur > 500 || max < 100 || max > 500) //Abnormal values have the potential to cause infinite loops in the server. if (cur < 0 || cur > 500 || max < 100 || max > 500) //Abnormal values have the potential to cause infinite loops in the server.
{ {
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true); TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
return false; return true;
} }
if (args.Player.IsLoggedIn) if (args.Player.IsLoggedIn)

View file

@ -163,8 +163,6 @@ namespace TShockAPI
/// </summary> /// </summary>
public bool DisplayLogs = true; public bool DisplayLogs = true;
public Vector2 oldSpawn = Vector2.Zero;
/// <summary> /// <summary>
/// The last player that the player whispered with (to or from). /// The last player that the player whispered with (to or from).
/// </summary> /// </summary>
@ -217,8 +215,6 @@ namespace TShockAPI
/// </summary> /// </summary>
public bool mute; public bool mute;
public bool TpLock;
private Player FakePlayer; private Player FakePlayer;
public bool RequestedSection; public bool RequestedSection;