mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Added immediate TP failure message for TPs to regions that aren't there,
instead of the 130s timeout somewhere. Additionally, mark the map-tile as offline. This partly fixes the TP problems of Mantis 2332; the rest is a viewer problem (just relogin).
This commit is contained in:
@@ -736,6 +736,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
avatar.ControllingClient.SendTeleportFailed("Remote Region appears to be down");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TP to a place that doesn't exist (anymore)
|
||||
// Inform the viewer about that
|
||||
avatar.ControllingClient.SendTeleportFailed("The region you tried to teleport to doesn't exist anymore");
|
||||
|
||||
// and set the map-tile to '(Offline)'
|
||||
uint regX, regY;
|
||||
Helpers.LongToUInts(regionHandle, out regX, out regY);
|
||||
|
||||
MapBlockData block = new MapBlockData();
|
||||
block.X = (ushort)(regX / Constants.RegionSize);
|
||||
block.Y = (ushort)(regY / Constants.RegionSize);
|
||||
block.Access = 254; // == not there
|
||||
|
||||
List<MapBlockData> blocks = new List<MapBlockData>();
|
||||
blocks.Add(block);
|
||||
avatar.ControllingClient.SendMapBlock(blocks, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user