Update server binary
Fix linux paths. Tile compression.
This commit is contained in:
parent
b442e64c4b
commit
63259938f8
4 changed files with 13 additions and 13 deletions
|
|
@ -660,7 +660,7 @@ namespace TShockAPI
|
|||
args.Player.TilePlaceThreshold++;
|
||||
var coords = new Vector2(tileX, tileY);
|
||||
if (!args.Player.TilesCreated.ContainsKey(coords))
|
||||
args.Player.TilesCreated.Add(coords, Main.tile[tileX, tileY]);
|
||||
args.Player.TilesCreated.Add(coords, Main.tile[tileX, tileY].Data);
|
||||
}
|
||||
|
||||
if ((type == 0 || type == 4) && Main.tileSolid[Main.tile[tileX, tileY].type] && !args.Player.Group.HasPermission(Permissions.ignorekilltiledetection))
|
||||
|
|
@ -668,7 +668,7 @@ namespace TShockAPI
|
|||
args.Player.TileKillThreshold++;
|
||||
var coords = new Vector2(tileX, tileY);
|
||||
if (!args.Player.TilesDestroyed.ContainsKey(coords))
|
||||
args.Player.TilesDestroyed.Add(coords, Main.tile[tileX, tileY]);
|
||||
args.Player.TilesDestroyed.Add(coords, Main.tile[tileX, tileY].Data);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
|
|||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("3.4.1.1224")]
|
||||
[assembly: AssemblyFileVersion("3.4.1.1224")]
|
||||
[assembly: AssemblyVersion("3.4.1.1229")]
|
||||
[assembly: AssemblyFileVersion("3.4.1.1229")]
|
||||
|
|
@ -34,8 +34,8 @@ namespace TShockAPI
|
|||
public int TilePlaceThreshold { get; set; }
|
||||
public int TileLiquidThreshold { get; set; }
|
||||
public int ProjectileThreshold { get; set; }
|
||||
public Dictionary<Vector2, Tile> TilesDestroyed { get; protected set; }
|
||||
public Dictionary<Vector2, Tile> TilesCreated { get; protected set; }
|
||||
public Dictionary<Vector2, TileData> TilesDestroyed { get; protected set; }
|
||||
public Dictionary<Vector2, TileData> TilesCreated { get; protected set; }
|
||||
public int FirstMaxHP { get; set; }
|
||||
public int FirstMaxMP { get; set; }
|
||||
public Group Group { get; set; }
|
||||
|
|
@ -168,16 +168,16 @@ namespace TShockAPI
|
|||
|
||||
public TSPlayer(int index)
|
||||
{
|
||||
TilesDestroyed = new Dictionary<Vector2, Tile>();
|
||||
TilesCreated = new Dictionary<Vector2, Tile>();
|
||||
TilesDestroyed = new Dictionary<Vector2, TileData>();
|
||||
TilesCreated = new Dictionary<Vector2, TileData>();
|
||||
Index = index;
|
||||
Group = new Group("null");
|
||||
}
|
||||
|
||||
protected TSPlayer(String playerName)
|
||||
{
|
||||
TilesDestroyed = new Dictionary<Vector2, Tile>();
|
||||
TilesCreated = new Dictionary<Vector2, Tile>();
|
||||
TilesDestroyed = new Dictionary<Vector2, TileData>();
|
||||
TilesCreated = new Dictionary<Vector2, TileData>();
|
||||
Index = -1;
|
||||
FakePlayer = new Player { name = playerName, whoAmi = -1 };
|
||||
Group = new Group("null");
|
||||
|
|
@ -433,12 +433,12 @@ namespace TShockAPI
|
|||
NetMessage.SendData((int)PacketTypes.NpcStrike, -1, -1, "", npcid, damage, knockBack, hitDirection);
|
||||
}
|
||||
|
||||
public void RevertTiles(Dictionary<Vector2, Tile> tiles)
|
||||
public void RevertTiles(Dictionary<Vector2, TileData> tiles)
|
||||
{
|
||||
// Update Main.Tile first so that when tile sqaure is sent it is correct
|
||||
foreach (KeyValuePair<Vector2, Tile> entry in tiles)
|
||||
foreach (KeyValuePair<Vector2, TileData> entry in tiles)
|
||||
{
|
||||
Main.tile[(int)entry.Key.X, (int)entry.Key.Y] = entry.Value;
|
||||
Main.tile[(int)entry.Key.X, (int)entry.Key.Y].Data = entry.Value;
|
||||
}
|
||||
// Send all players updated tile sqaures
|
||||
foreach (Vector2 coords in tiles.Keys)
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue