Merge pull request #1603 from mistzzt/fix-tile-entity
Fix tile entity placing
This commit is contained in:
commit
8d45222af3
2 changed files with 11 additions and 3 deletions
|
|
@ -79,6 +79,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
|||
* Removed `Utils.GetGroup()` also have you seen `Groups.GetGroupByName()`? (@hakusaro)
|
||||
* `Utils.MaxChests()` is now `Utils.HasWorldReachedMaxChests()`. (@hakusaro)
|
||||
* `Utils.GetIPv4Address()` is now `Utils.GetIPv4AddressFromHostname()`. (@hakusaro)
|
||||
* Fixed the disappearing problem when placing tile entities. (@mistzzt)
|
||||
|
||||
## TShock 4.3.25
|
||||
* Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6.
|
||||
|
|
|
|||
|
|
@ -1709,14 +1709,20 @@ namespace TShockAPI
|
|||
Main.tile[realx, realy].frameY = newtile.FrameY;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// Landmine
|
||||
if (tile.type == TileID.LandMine && !newtile.Active)
|
||||
{
|
||||
Main.tile[realx, realy].active(false);
|
||||
changed = true;
|
||||
}
|
||||
// Sensors
|
||||
if(newtile.Type == TileID.LogicSensor && !Main.tile[realx, realy].active())
|
||||
|
||||
// Tile entities: sensors, item frames, training dummies
|
||||
// here it handles all tile entities listed in `TileEntityID`
|
||||
if ((newtile.Type == TileID.LogicSensor ||
|
||||
newtile.Type == TileID.ItemFrame ||
|
||||
newtile.Type == TileID.TargetDummy) &&
|
||||
!Main.tile[realx, realy].active())
|
||||
{
|
||||
Main.tile[realx, realy].type = newtile.Type;
|
||||
Main.tile[realx, realy].frameX = newtile.FrameX;
|
||||
|
|
@ -1748,6 +1754,7 @@ namespace TShockAPI
|
|||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Stone wall <-> Stone wall
|
||||
if (((tile.wall == 1 || tile.wall == 3 || tile.wall == 28 || tile.wall == 83) &&
|
||||
(newtile.Wall == 1 || newtile.Wall == 3 || newtile.Wall == 28 || newtile.Wall == 83)) ||
|
||||
|
|
@ -1786,8 +1793,8 @@ namespace TShockAPI
|
|||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, size);
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue