Send player back to spawn if remembered position puts them somewhere they can't really go.
This commit is contained in:
parent
e7889a7951
commit
364d4cb3f6
1 changed files with 3 additions and 3 deletions
|
|
@ -854,9 +854,9 @@ namespace TShockAPI
|
|||
|
||||
if (Config.RememberLeavePos)
|
||||
{
|
||||
if (RememberedPos.GetLeavePos(player.Name, player.IP) != Vector2.Zero){
|
||||
if (RememberedPos.GetLeavePos(player.Name, player.IP) != Vector2.Zero){
|
||||
var pos = RememberedPos.GetLeavePos(player.Name, player.IP);
|
||||
player.LastNetPosition = pos;
|
||||
|
||||
player.Teleport((int) pos.X, (int) pos.Y + 3);
|
||||
}}
|
||||
|
||||
|
|
@ -1433,4 +1433,4 @@ namespace TShockAPI
|
|||
Utils.HashAlgo = file.HashAlgorithm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue