diff options
author | Teravus Ovares | 2007-11-25 04:52:14 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-25 04:52:14 +0000 |
commit | d263a044b1ebb13477b2b391637ccc2da4368838 (patch) | |
tree | 6288ef8e8f2a1c073705b23db8aba8603a28c34d /OpenSim/Region/Environment/EstateManager.cs | |
parent | Ignore nullreferenceexception in removeclient. The avatar is already gone. (diff) | |
download | opensim-SC-d263a044b1ebb13477b2b391637ccc2da4368838.zip opensim-SC-d263a044b1ebb13477b2b391637ccc2da4368838.tar.gz opensim-SC-d263a044b1ebb13477b2b391637ccc2da4368838.tar.bz2 opensim-SC-d263a044b1ebb13477b2b391637ccc2da4368838.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Region/Environment/EstateManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/EstateManager.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index c569fc5..b847e4f 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -171,6 +171,12 @@ namespace OpenSim.Region.Environment | |||
171 | if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) | 171 | if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) |
172 | estateSetRegionTerrainHandler(packet); | 172 | estateSetRegionTerrainHandler(packet); |
173 | break; | 173 | break; |
174 | case "restart": | ||
175 | if (m_scene.PermissionsMngr.CanRestartSim(remote_client.AgentId)) | ||
176 | { | ||
177 | estateRestartSim(packet); | ||
178 | } | ||
179 | break; | ||
174 | default: | 180 | default: |
175 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 181 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
176 | break; | 182 | break; |
@@ -322,6 +328,19 @@ namespace OpenSim.Region.Environment | |||
322 | } | 328 | } |
323 | } | 329 | } |
324 | } | 330 | } |
331 | private void estateRestartSim(EstateOwnerMessagePacket packet) | ||
332 | { | ||
333 | // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. | ||
334 | foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) | ||
335 | { | ||
336 | float timeSeconds = 0; | ||
337 | timeSeconds = BitConverter.ToInt16(block.Parameter, 1); | ||
338 | timeSeconds = (int)((timeSeconds / 100) - 3); | ||
339 | m_scene.Restart(timeSeconds); | ||
340 | |||
341 | } | ||
342 | } | ||
343 | |||
325 | 344 | ||
326 | #endregion | 345 | #endregion |
327 | 346 | ||