add gohome command support
This commit is contained in:
parent
befca0b46d
commit
59f995b8b2
1 changed files with 7 additions and 3 deletions
|
|
@ -46,6 +46,12 @@ namespace SecondBotEvents.Services
|
||||||
protected bool attemptedTeleportBackup = false;
|
protected bool attemptedTeleportBackup = false;
|
||||||
protected long teleportActionLockout = 0;
|
protected long teleportActionLockout = 0;
|
||||||
|
|
||||||
|
public void GoHome()
|
||||||
|
{
|
||||||
|
attemptedTeleportHome = true;
|
||||||
|
LogFormater.Info("Teleporting to home sim");
|
||||||
|
GetClient().Self.Teleport(home.name, new Vector3(home.x, home.y, home.z), new Vector3(0, 0, 0));
|
||||||
|
}
|
||||||
protected void Tick()
|
protected void Tick()
|
||||||
{
|
{
|
||||||
if (evacWanted == true)
|
if (evacWanted == true)
|
||||||
|
|
@ -90,9 +96,7 @@ namespace SecondBotEvents.Services
|
||||||
teleportActionLockout = SecondbotHelpers.UnixTimeNow();
|
teleportActionLockout = SecondbotHelpers.UnixTimeNow();
|
||||||
if (attemptedTeleportHome == false)
|
if (attemptedTeleportHome == false)
|
||||||
{
|
{
|
||||||
attemptedTeleportHome = true;
|
GoHome();
|
||||||
LogFormater.Info("Teleporting to home sim");
|
|
||||||
GetClient().Self.Teleport(home.name, new Vector3(home.x, home.y, home.z), new Vector3(0, 0, 0));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(attemptedTeleportBackup == false)
|
else if(attemptedTeleportBackup == false)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue