Fixed kill tile crash when switching to vector2
This commit is contained in:
parent
e9dd445055
commit
ce38ac1895
2 changed files with 5 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
public static readonly string SavePath = "tshock";
|
public static readonly string SavePath = "tshock";
|
||||||
|
|
||||||
public static readonly Version VersionNum = new Version(2, 1, 0, 4);
|
public static readonly Version VersionNum = new Version(2, 1, 0, 6);
|
||||||
|
|
||||||
public static readonly string VersionCodename = "Forgot to increase the version.";
|
public static readonly string VersionCodename = "Forgot to increase the version.";
|
||||||
|
|
||||||
|
|
@ -401,7 +401,9 @@ namespace TShockAPI
|
||||||
if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active)
|
if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active)
|
||||||
{
|
{
|
||||||
Players[e.Msg.whoAmI].TileThreshold++;
|
Players[e.Msg.whoAmI].TileThreshold++;
|
||||||
Players[e.Msg.whoAmI].TilesDestroyed.Add(new Vector2(x, y), Main.tile[x, y]);
|
var coords = new Vector2(x, y);
|
||||||
|
if (!Players[e.Msg.whoAmI].TilesDestroyed.ContainsKey(coords))
|
||||||
|
Players[e.Msg.whoAmI].TilesDestroyed.Add(coords, Main.tile[x, y]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
return Ban(ply, reason);
|
return Ban(ply, reason);
|
||||||
}
|
}
|
||||||
else if (kick)
|
if (kick)
|
||||||
{
|
{
|
||||||
return Kick(ply, reason);
|
return Kick(ply, reason);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue