diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 3f0c87ac44..e94b9aa682 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -426,7 +426,7 @@ namespace OpenSim.Framework
void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
uint flags, string capsURL);
- void SendTeleportCancel();
+ void SendTeleportFailed();
void SendTeleportLocationStart();
void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 80111d939f..25d23be581 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -467,13 +467,13 @@ namespace OpenSim.Region.ClientStack
///
///
///
- public void SendTeleportCancel()
+ public void SendTeleportFailed()
{
- TeleportCancelPacket tpCancel = new TeleportCancelPacket();
- tpCancel.Info.SessionID = m_sessionId;
- tpCancel.Info.AgentID = AgentId;
+ TeleportFailedPacket tpFailed = new TeleportFailedPacket();
+ tpFailed.Info.AgentID = this.AgentId;
+ tpFailed.Info.Reason = Helpers.StringToField("unknown failure of teleport");
- OutPacket(tpCancel, ThrottleOutPacketType.Task);
+ OutPacket(tpFailed, ThrottleOutPacketType.Task);
}
///
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index bcd845f254..7445c2e029 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -113,6 +113,7 @@ namespace OpenSim.Region.ClientStack
udpServer.LocalScene = scene;
scene.LoadWorldMap();
+ scene.RegisterRegionWithGrid();
scene.PhysScene = GetPhysicsScene();
scene.PhysScene.SetTerrain(scene.Terrain.GetHeights1D());
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ef08486798..68af360513 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -258,8 +258,6 @@ namespace OpenSim.Region.Environment.Scenes
httpListener = httpServer;
m_dumpAssetsToFile = dumpAssetsToFile;
- // This function was moved to terrain for some kind of map hack by babble
- RegisterRegionWithComms();
}
#endregion
@@ -291,6 +289,7 @@ namespace OpenSim.Region.Environment.Scenes
}
return true;
}
+
public virtual void Restart(float seconds)
{
if (seconds < 15)
@@ -312,6 +311,7 @@ namespace OpenSim.Region.Environment.Scenes
}
+
public void restartTimer_Elapsed(object sender, ElapsedEventArgs e)
{
m_RestartTimerCounter++;
@@ -328,6 +328,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+
public void restartNOW()
{
MainLog.Instance.Error("REGION", "Closing");
@@ -335,6 +336,7 @@ namespace OpenSim.Region.Environment.Scenes
MainLog.Instance.Error("REGION", "Firing Region Restart Message");
base.Restart(0);
}
+
public void restart_Notify_Wait_Elapsed(object sender, ElapsedEventArgs e)
{
m_restartWaitTimer.Stop();
@@ -363,6 +365,7 @@ namespace OpenSim.Region.Environment.Scenes
// Reset list to nothing.
m_regionRestartNotifyList = new List();
}
+
public override void Close()
{
ForEachScenePresence(delegate(ScenePresence avatar)
@@ -534,7 +537,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (Terrain.Tainted() && !Terrain.StillEditing())
{
- CreateTerrainTexture();
+ CreateTerrainTexture(true);
lock (Terrain.heightmap)
{
@@ -683,12 +686,9 @@ namespace OpenSim.Region.Environment.Scenes
Terrain.SetHeights2D(map);
}
- CreateTerrainTextureInitial();
+ CreateTerrainTexture(false);
//CommsManager.GridService.RegisterRegion(RegionInfo); //hack to update the terrain texture in grid mode so it shows on world map
-
- // These two 'commands' *must be* next to each other or sim rebooting fails.
- m_sceneGridService.RegisterRegion(RegionInfo);
- m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo);
+
}
catch (Exception e)
{
@@ -696,10 +696,18 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ public void RegisterRegionWithGrid()
+ {
+ RegisterCommsEvents();
+ // These two 'commands' *must be* next to each other or sim rebooting fails.
+ m_sceneGridService.RegisterRegion(RegionInfo);
+ m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo);
+ }
+
///
///
///
- public void CreateTerrainTexture()
+ public void CreateTerrainTexture(bool temporary)
{
//create a texture asset of the terrain
byte[] data = Terrain.ExportJpegImage("defaultstripe.png");
@@ -710,24 +718,11 @@ namespace OpenSim.Region.Environment.Scenes
asset.Name = "terrainImage";
asset.Description = RegionInfo.RegionName;
asset.Type = 0;
- asset.Temporary = true;
+ asset.Temporary = temporary;
AssetCache.AddAsset(asset);
}
- public void CreateTerrainTextureInitial()
- {
- //create a texture asset of the terrain
- byte[] data = Terrain.ExportJpegImage("defaultstripe.png");
- m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
- AssetBase asset = new AssetBase();
- asset.FullID = m_regInfo.EstateSettings.terrainImageID;
- asset.Data = data;
- asset.Name = "terrainImage";
- asset.Description = RegionInfo.RegionName;
- asset.Type = 0;
- asset.Temporary = false;
- AssetCache.AddAsset(asset);
- }
+
#endregion
#region Primitives Methods
@@ -1117,7 +1112,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void RegisterRegionWithComms()
+ public void RegisterCommsEvents()
{
// Don't register here. babblefro moved registration to *after *the map
// functions on line 675 so that a proper map will generate and get sent to grid services
@@ -1129,11 +1124,9 @@ namespace OpenSim.Region.Environment.Scenes
m_sceneGridService.OnCloseAgentConnection += CloseConnection;
m_sceneGridService.OnRegionUp += OtherRegionUp;
- m_sceneGridService.KillObject = SendKillObject;
-
- // Tell Other regions that I'm here.
-
+ m_sceneGridService.KillObject = SendKillObject;
}
+
public void UnRegisterReginWithComms()
{
m_sceneGridService.OnRegionUp -= OtherRegionUp;
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 550b232f29..56316e6059 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -255,7 +255,7 @@ namespace SimpleApp
{
}
- public virtual void SendTeleportCancel()
+ public virtual void SendTeleportFailed()
{
}
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index 389ba47d38..535d519172 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -63,7 +63,7 @@ namespace SimpleApp
}
Terrain.GetHeights1D(map);
- CreateTerrainTexture();
+ CreateTerrainTexture(true);
}
public override void AddNewClient(IClientAPI client, bool child)