* Added the ability to restart your individual sims from within them using the estate tools.

* The sims properly restart, however they don't yet notify the existing avatars that they are up.  To see the sim again, you'll need to log-out and back in until I can figure out how to get the proper data to the sims and to the avatar so they reconnect again.
This commit is contained in:
Teravus Ovares
2007-11-25 04:52:14 +00:00
parent 21ce2b0979
commit d263a044b1
10 changed files with 336 additions and 8 deletions

View File

@@ -171,6 +171,12 @@ namespace OpenSim.Region.Environment
if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
estateSetRegionTerrainHandler(packet);
break;
case "restart":
if (m_scene.PermissionsMngr.CanRestartSim(remote_client.AgentId))
{
estateRestartSim(packet);
}
break;
default:
MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
break;
@@ -322,6 +328,19 @@ namespace OpenSim.Region.Environment
}
}
}
private void estateRestartSim(EstateOwnerMessagePacket packet)
{
// There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
{
float timeSeconds = 0;
timeSeconds = BitConverter.ToInt16(block.Parameter, 1);
timeSeconds = (int)((timeSeconds / 100) - 3);
m_scene.Restart(timeSeconds);
}
}
#endregion