[Opensim-dev] varregion and map teleporting improvements

GarminKawaguichi garmin.kawaguichi at magalaxie.com
Tue Jan 28 13:44:01 UTC 2014


Le 27/01/2014 17:57, Mister Blue a écrit :
> Some new commits to the 'varregion' branch in the OpenSimulator source 
> repository have added better map display and teleporting for large 
> varregions -- you can now click on a large region in the map and 
> teleport to that location.
>
In the same vein, teleport by "Double Click" within the VarRegion did 
not work with the version of 2014_01_21;with the latest version, there 
is an improvement but half the time the teleport goesfailsor sometimes 
in the wrong place.

With version 2014_01_21 we had a workaround which gave good results 
(within the VarRegion) :

OpenSim\Region\ClientStack\Linden\UDP\LLClientView.cs

in        private bool HandleTeleportLocationRequest(IClientAPI sender, 
Packet Pack)
Ln 8945 before handlerTeleportLocationRequest(this,......

                 //Check if the regionhandle is inside the varRegion
                 //If true :: change regionhandle & position X Y
                 uint locx = 0, locy = 0;
Util.RegionHandleToWorldLoc(tpLocReq.Info.RegionHandle, out locx, out locy);
                 if ((locx >= m_scene.RegionInfo.WorldLocX) && (locx <= 
(m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX))
                     && (locy >= m_scene.RegionInfo.WorldLocY) && (locy 
<= (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)))
                 {
                     tpLocReq.Info.RegionHandle = 
m_scene.RegionInfo.RegionHandle;
                     tpLocReq.Info.Position.X += (locx - 
m_scene.RegionInfo.WorldLocX);
                     tpLocReq.Info.Position.Y += (locy - 
m_scene.RegionInfo.WorldLocY);
                 }

Tested with the last commit (2014_01_28) the results are acceptable.
Windows 7 and Net4
VarRegion 1024 x 1024 standalone
FireStorm and Singularity

If it can inspire you ...
MML






More information about the Opensim-dev mailing list