Add max range for being restricted
Change max reserved slots to 20
This commit is contained in:
parent
31c4e1a37b
commit
14e2d8ca46
3 changed files with 7 additions and 4 deletions
|
|
@ -204,6 +204,9 @@ namespace TShockAPI
|
||||||
|
|
||||||
[Description("Disables Invisibility potions from being used in PvP (Note, they can use them on the client, but the effect isn't sent to the rest of the server)")]
|
[Description("Disables Invisibility potions from being used in PvP (Note, they can use them on the client, but the effect isn't sent to the rest of the server)")]
|
||||||
public bool DisableInvisPvP = false;
|
public bool DisableInvisPvP = false;
|
||||||
|
|
||||||
|
[Description("The maximum distance players disabled for various reasons can move from")]
|
||||||
|
public int MaxRangeForDisabled = 10;
|
||||||
|
|
||||||
public static ConfigFile Read(string path)
|
public static ConfigFile Read(string path)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -615,7 +615,7 @@ namespace TShockAPI
|
||||||
if (!pos.Equals(args.Player.LastNetPosition))
|
if (!pos.Equals(args.Player.LastNetPosition))
|
||||||
{
|
{
|
||||||
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 > TShock.Config.MaxRangeForDisabled)
|
||||||
{
|
{
|
||||||
if(args.Player.IgnoreActionsForCheating != "none")
|
if(args.Player.IgnoreActionsForCheating != "none")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1243,9 +1243,9 @@ namespace TShockAPI
|
||||||
Netplay.serverPort = file.ServerPort;
|
Netplay.serverPort = file.ServerPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.MaxSlots > 250)
|
if (file.MaxSlots > 235)
|
||||||
file.MaxSlots = 250;
|
file.MaxSlots = 235;
|
||||||
Main.maxNetPlayers = file.MaxSlots + 5;
|
Main.maxNetPlayers = file.MaxSlots + 20;
|
||||||
|
|
||||||
Netplay.spamCheck = false;
|
Netplay.spamCheck = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue