Fix another sendtilesquare exploit
... removing EnableInsecureTileFixes in the process.
This commit is contained in:
parent
a81165026c
commit
16093fd9ca
2 changed files with 3 additions and 14 deletions
|
|
@ -146,10 +146,6 @@ namespace TShockAPI
|
||||||
|
|
||||||
[Description("Displays a player's IP on join to everyone who has the log permission.")] public bool DisplayIPToAdmins;
|
[Description("Displays a player's IP on join to everyone who has the log permission.")] public bool DisplayIPToAdmins;
|
||||||
|
|
||||||
[Description(
|
|
||||||
"Some tiles are 'fixed' by not letting TShock handle them. Disabling this may break certain aesthetic tiles.")] public
|
|
||||||
bool EnableInsecureTileFixes = true;
|
|
||||||
|
|
||||||
[Description("Kicks users using a proxy as identified with the GeoIP database.")] public bool KickProxyUsers = true;
|
[Description("Kicks users using a proxy as identified with the GeoIP database.")] public bool KickProxyUsers = true;
|
||||||
|
|
||||||
[Description("Disables hardmode, can't never be activated. Overrides /starthardmode.")] public bool DisableHardmode;
|
[Description("Disables hardmode, can't never be activated. Overrides /starthardmode.")] public bool DisableHardmode;
|
||||||
|
|
|
||||||
|
|
@ -1604,7 +1604,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tiles that can be oriented (e.g., beds, chairs, bathtubs, etc).
|
/// Tiles that can be oriented (e.g., beds, chairs, bathtubs, etc).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static byte[] orientableTiles = new byte[] { 15, 79, 90, 128, 137, 209 };
|
private static byte[] orientableTiles = new byte[] { 15, 79, 90, 105, 128, 137, 139, 209 };
|
||||||
|
|
||||||
private static bool HandleSendTileSquare(GetDataHandlerArgs args)
|
private static bool HandleSendTileSquare(GetDataHandlerArgs args)
|
||||||
{
|
{
|
||||||
|
|
@ -1667,14 +1667,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((tile.type == 128 && newtile.Type == 128) || (tile.type == 105 && newtile.Type == 105) || (tile.type == 139 && newtile.Type == 139))
|
|
||||||
{
|
|
||||||
if (TShock.Config.EnableInsecureTileFixes)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Orientable tiles
|
// Orientable tiles
|
||||||
if (tile.type == newtile.Type && orientableTiles.Contains(tile.type))
|
if (tile.type == newtile.Type && orientableTiles.Contains(tile.type))
|
||||||
{
|
{
|
||||||
|
|
@ -1846,7 +1839,7 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
Item selectedItem = args.Player.SelectedItem;
|
Item selectedItem = args.Player.SelectedItem;
|
||||||
if (type == 0 && !Main.tileCut[Main.tile[tileX, tileY].type] && !breakableTiles.Contains(Main.tile[tileX, tileY].type))
|
if (action == EditAction.KillTile && !Main.tileCut[Main.tile[tileX, tileY].type] && !breakableTiles.Contains(Main.tile[tileX, tileY].type))
|
||||||
{
|
{
|
||||||
// If the tile is an axe tile and they aren't selecting an axe, they're hacking.
|
// If the tile is an axe tile and they aren't selecting an axe, they're hacking.
|
||||||
if (Main.tileAxe[Main.tile[tileX, tileY].type] && (selectedItem.axe == 0 && selectedItem.explosive == 0 && args.Player.RecentFuse == 0))
|
if (Main.tileAxe[Main.tile[tileX, tileY].type] && (selectedItem.axe == 0 && selectedItem.explosive == 0 && args.Player.RecentFuse == 0))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue