Implement re-transmit of data if event handled in OnTilEdit
Thanks to the suggestion of @bartico6, we now re-transmit packets of world data to prevent desync issues with respect to stopping a server action but not fixing the client's view of the world.
This commit is contained in:
parent
eed7b3fad2
commit
ce822caf2a
1 changed files with 5 additions and 1 deletions
|
|
@ -300,6 +300,7 @@ namespace TShockAPI
|
|||
|
||||
if (!TShock.Utils.TilePlacementValid(tileX, tileY))
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
|
@ -312,6 +313,7 @@ namespace TShockAPI
|
|||
|
||||
if (args.Player.Dead && TShock.Config.PreventDeadModification)
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
|
@ -377,6 +379,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: REMOVE. This does NOT look like Bouncer code.
|
||||
if (args.Player.AwaitingTempPoint > 0)
|
||||
{
|
||||
args.Player.TempPoints[args.Player.AwaitingTempPoint - 1].X = tileX;
|
||||
|
|
@ -656,7 +659,8 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
// Why 0.2?
|
||||
// @bartico6: Because heal other player only happens when you are using the spectre armor with the hood, and the healing you can do with that is 20% of your damage.
|
||||
// @bartico6: Because heal other player only happens when you are using the spectre armor with the hood,
|
||||
// and the healing you can do with that is 20% of your damage.
|
||||
if (amount > TShock.Config.MaxDamage * 0.2)
|
||||
{
|
||||
args.Player.Disable("HealOtherPlayer cheat attempt!", DisableFlags.WriteToLogAndConsole);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue