Fixed kill tile crash when switching to vector2

This commit is contained in:
high 2011-06-14 22:52:21 -04:00
parent e9dd445055
commit ce38ac1895
2 changed files with 5 additions and 3 deletions

View file

@ -37,7 +37,7 @@ namespace TShockAPI
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.";
@ -401,7 +401,9 @@ namespace TShockAPI
if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active)
{
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;

View file

@ -284,7 +284,7 @@ namespace TShockAPI
{
return Ban(ply, reason);
}
else if (kick)
if (kick)
{
return Kick(ply, reason);
}