Fix a read bug on NetTiles that causes tiles to have junk data

This commit is contained in:
Chris 2020-05-29 17:12:46 +09:30
parent e10e9f76f3
commit 45e5773c23
2 changed files with 11 additions and 3 deletions

View file

@ -2316,6 +2316,14 @@ namespace TShockAPI
{
var player = args.Player;
var size = args.Data.ReadInt16();
var changeType = TileChangeType.None;
bool hasChangeType = ((size & 0x7FFF) & 0x8000) != 0;
if (hasChangeType)
{
changeType = (TileChangeType)args.Data.ReadInt8();
}
var tileX = args.Data.ReadInt16();
var tileY = args.Data.ReadInt16();
var data = args.Data;