Merge pull request #2888 from bcat/quickstack-rm-rangecheck
Remove unnecessary range check for quick stack
This commit is contained in:
commit
9e9996f902
2 changed files with 3 additions and 6 deletions
|
|
@ -676,17 +676,13 @@ namespace TShockAPI
|
||||||
|
|
||||||
if (args.Chest != null)
|
if (args.Chest != null)
|
||||||
{
|
{
|
||||||
|
// After checking for protected regions, no further range checking is necessarily because the client packet only specifies the
|
||||||
|
// inventory slot to quick stack. The vanilla Terraria server itself determines what chests are close enough to the player.
|
||||||
if (Config.Settings.RegionProtectChests && !Regions.CanBuild((int)args.WorldPosition.X, (int)args.WorldPosition.Y, tsplr))
|
if (Config.Settings.RegionProtectChests && !Regions.CanBuild((int)args.WorldPosition.X, (int)args.WorldPosition.Y, tsplr))
|
||||||
{
|
{
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tsplr.IsInRange(args.Chest.x, args.Chest.y))
|
|
||||||
{
|
|
||||||
args.Handled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ Use past tense when adding new entries; sign your name off when you add or chang
|
||||||
* Set the `GetDataHandledEventArgs.Player` property for the `SyncTilePicking` data handler. (@drunderscore)
|
* Set the `GetDataHandledEventArgs.Player` property for the `SyncTilePicking` data handler. (@drunderscore)
|
||||||
* Relaxed custom death message restrictions to allow Inferno potions in PvP. (@drunderscore)
|
* Relaxed custom death message restrictions to allow Inferno potions in PvP. (@drunderscore)
|
||||||
* Allowed Flower Boots to place Ash Flowers on Ash Grass blocks. (@punchready)
|
* Allowed Flower Boots to place Ash Flowers on Ash Grass blocks. (@punchready)
|
||||||
|
* Removed unnecessary range check that artifically shortened quick stack reach. (@boddyn, #2885, @bcat)
|
||||||
|
|
||||||
## TShock 5.1.3
|
## TShock 5.1.3
|
||||||
* Added support for Terraria 1.4.4.9 via OTAPI 3.1.20. (@SignatureBeef)
|
* Added support for Terraria 1.4.4.9 via OTAPI 3.1.20. (@SignatureBeef)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue