Fixed concurrent dictionary access.
This commit is contained in:
parent
bacb23b5ba
commit
5e50264194
2 changed files with 15 additions and 9 deletions
|
|
@ -894,7 +894,8 @@ namespace TShockAPI
|
|||
{
|
||||
player.TileKillThreshold = 0;
|
||||
//We don't want to revert the entire map in case of a disable.
|
||||
player.TilesDestroyed.Clear();
|
||||
lock (player.TilesDestroyed)
|
||||
player.TilesDestroyed.Clear();
|
||||
}
|
||||
|
||||
if (player.TilesCreated != null)
|
||||
|
|
@ -902,8 +903,10 @@ namespace TShockAPI
|
|||
if (player.TilePlaceThreshold >= Config.TilePlaceThreshold)
|
||||
{
|
||||
player.Disable("Reached TilePlace threshold", flags);
|
||||
TSPlayer.Server.RevertTiles(player.TilesCreated);
|
||||
player.TilesCreated.Clear();
|
||||
lock (player.TilesCreated) {
|
||||
TSPlayer.Server.RevertTiles(player.TilesCreated);
|
||||
player.TilesCreated.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player.TilePlaceThreshold > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue