Exploit prevention. Previously, the server trusted the client's tileType, now we check it ourselves.
This commit is contained in:
parent
c7871cd88f
commit
39c0007c84
1 changed files with 1 additions and 2 deletions
|
|
@ -1094,7 +1094,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
foreach (Point p in player.IceTiles)
|
foreach (Point p in player.IceTiles)
|
||||||
{
|
{
|
||||||
if (p.X == tileX && p.Y == tileY && (tileType == 0 || tileType == 127))
|
if (p.X == tileX && p.Y == tileY && (Main.tile[p.X, p.Y].type == 0 || Main.tile[p.X, p.Y].type == 127))
|
||||||
{
|
{
|
||||||
player.IceTiles.Remove(p);
|
player.IceTiles.Remove(p);
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1106,7 +1106,6 @@ namespace TShockAPI
|
||||||
|
|
||||||
if (TShock.Config.AllowIce && actionType == 1 && tileType == 127)
|
if (TShock.Config.AllowIce && actionType == 1 && tileType == 127)
|
||||||
{
|
{
|
||||||
|
|
||||||
player.IceTiles.Add(new Point(tileX, tileY));
|
player.IceTiles.Add(new Point(tileX, tileY));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue