Fix grass mowing keeping hanging vines intact
Creating a long row of grass with vines below and then mowing it without breaking the vines below could cause a tile framing stack overflow due to all vines being cleared at once if one of them is being broken on the server or if the client simply loads the corresponding section. Warning: this does not fix eventual existing worlds that are already in such a state.
This commit is contained in:
parent
699dbf9403
commit
e53b723bd8
1 changed files with 5 additions and 1 deletions
|
|
@ -350,9 +350,13 @@ namespace TShockAPI.Handlers
|
|||
))
|
||||
{
|
||||
UpdateServerTileState(tile, newTile, TileDataType.Tile);
|
||||
if (TileID.Sets.IsVine[Main.tile[realX, realY + 1].type]) // vanilla does in theory break the vines on its own, but we can't trust that
|
||||
{
|
||||
WorldGen.KillTile(realX, realY + 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Conversion: only sends a 1x1 rect
|
||||
// Conversion: only sends a 1x1 rect; has to happen AFTER grass mowing as it would otherwise also let mowing through, but without fixing vines
|
||||
if (rectWidth == 1 && rectLength == 1)
|
||||
{
|
||||
ProcessConversionSpreads(tile, newTile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue