Added spawn protection radius to config.
This commit is contained in:
parent
48ea956724
commit
b9ff874351
3 changed files with 5 additions and 1 deletions
|
|
@ -721,7 +721,7 @@ namespace TShockAPI
|
|||
Vector2 tile = new Vector2((float)x, (float)y);
|
||||
Vector2 spawn = new Vector2((float)Main.spawnTileX, (float)Main.spawnTileY);
|
||||
var distance = Vector2.Distance(spawn, tile);
|
||||
if (distance > 5)
|
||||
if (distance > (float)ConfigurationManager.spawnProtectRadius)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue