Attempt another invis fix
Drops HP packets which have the current HP <= 0. Also removes some unused TSPlayer fields.
This commit is contained in:
parent
02820c0172
commit
652425c4ba
2 changed files with 2 additions and 6 deletions
|
|
@ -1319,7 +1319,7 @@ namespace TShockAPI
|
|||
var cur = args.Data.ReadInt16();
|
||||
var max = args.Data.ReadInt16();
|
||||
|
||||
if (OnPlayerHP(plr, cur, max))
|
||||
if (OnPlayerHP(plr, cur, max) || cur <= 0)
|
||||
return true;
|
||||
|
||||
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.
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.Player.IsLoggedIn)
|
||||
|
|
|
|||
|
|
@ -163,8 +163,6 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public bool DisplayLogs = true;
|
||||
|
||||
public Vector2 oldSpawn = Vector2.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// The last player that the player whispered with (to or from).
|
||||
/// </summary>
|
||||
|
|
@ -217,8 +215,6 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public bool mute;
|
||||
|
||||
public bool TpLock;
|
||||
|
||||
private Player FakePlayer;
|
||||
|
||||
public bool RequestedSection;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue