Add pCampbot console commands to sit all bots on ground and stand all bots

This commit is contained in:
Justin Clark-Casey (justincc)
2013-08-20 17:01:12 +01:00
parent a3dd7db4a3
commit 56d1d67a34
2 changed files with 51 additions and 47 deletions

View File

@@ -318,6 +318,30 @@ namespace pCampBot
}
}
/// <summary>
/// Sit this bot on the ground.
/// </summary>
public void SitOnGround()
{
if (ConnectionState == ConnectionState.Connected)
Client.Self.SitOnGround();
}
/// <summary>
/// Stand this bot
/// </summary>
public void Stand()
{
if (ConnectionState == ConnectionState.Connected)
{
// Unlike sit on ground, here libomv checks whether we have SEND_AGENT_UPDATES enabled.
bool prevUpdatesSetting = Client.Settings.SEND_AGENT_UPDATES;
Client.Settings.SEND_AGENT_UPDATES = true;
Client.Self.Stand();
Client.Settings.SEND_AGENT_UPDATES = prevUpdatesSetting;
}
}
public void SaveDefaultAppearance()
{
saveDir = "MyAppearance/" + FirstName + "_" + LastName;