Quick fixes to new features.

This commit is contained in:
Zidonuke 2011-12-20 17:40:04 -05:00
parent 318bbac56a
commit 7c09a174e8
3 changed files with 9 additions and 5 deletions

View file

@ -40,7 +40,7 @@ namespace TShockAPI
[Description("Enable the ability for invaison size to never decrease. Make sure to run /invade, and note that this adds 2 million+ goblins to the spawn que for the map.")] [Description("Enable the ability for invaison size to never decrease. Make sure to run /invade, and note that this adds 2 million+ goblins to the spawn que for the map.")]
public bool InfiniteInvasion; public bool InfiniteInvasion;
[Description("Enable or disable perma pvp.")] [Description("Enable or disable perma pvp.")]
public bool AlwaysPvP; public bool AlwaysPvP = false;
[Description("Kicks players who edit save files for cheating.")] [Description("Kicks players who edit save files for cheating.")]
public bool KickCheaters = true; public bool KickCheaters = true;
[Description("Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.")] [Description("Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.")]

View file

@ -571,10 +571,14 @@ namespace TShockAPI
float distance = Vector2.Distance(new Vector2((pos.X / 16f), (pos.Y / 16f)), new Vector2(Main.spawnTileX, Main.spawnTileY)); float distance = Vector2.Distance(new Vector2((pos.X / 16f), (pos.Y / 16f)), new Vector2(Main.spawnTileX, Main.spawnTileY));
if (TShock.CheckIgnores(args.Player) && distance > 6f) if (TShock.CheckIgnores(args.Player) && distance > 6f)
{ {
if (TShock.Config.AlwaysPvP) if (TShock.Config.AlwaysPvP && !args.TPlayer.hostile)
{ {
args.Player.SendMessage("PvP is forced! Enable PvP else you can't move or do anything!", Color.Red); args.Player.SendMessage("PvP is forced! Enable PvP else you can't move or do anything!", Color.Red);
} }
else if (TShock.Config.ServerSideInventory && !args.Player.IsLoggedIn)
{
args.Player.SendMessage("Server Side Inventory is enabled! Please /register or /login to play!", Color.Red);
}
args.Player.Spawn(); args.Player.Spawn();
return true; return true;
} }

View file

@ -729,14 +729,14 @@ namespace TShockAPI
TShock.Utils.HandleCheater(player, "Health/Mana cheat detected. Please use a different character."); TShock.Utils.HandleCheater(player, "Health/Mana cheat detected. Please use a different character.");
} }
if (TShock.Config.ServerSideInventory) NetMessage.syncPlayers();
if (Config.ServerSideInventory && !player.IsLoggedIn)
{ {
player.IgnoreActionsForInventory = true; player.IgnoreActionsForInventory = true;
player.SendMessage("Server Side Inventory is enabled! Please /register or /login to play!", Color.Red); player.SendMessage("Server Side Inventory is enabled! Please /register or /login to play!", Color.Red);
} }
NetMessage.syncPlayers();
if (Config.AlwaysPvP && !player.TPlayer.hostile) if (Config.AlwaysPvP && !player.TPlayer.hostile)
{ {
player.IgnoreActionsForPvP = true; player.IgnoreActionsForPvP = true;