mirror of
https://github.com/opensim/opensim.git
synced 2026-08-03 15:36:16 +08:00
varregion: many more updates removing the constant RegionSize and replacing
with a passed region size. This time in the map code and grid services code.
This commit is contained in:
@@ -4333,7 +4333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID agentId = new UUID();
|
||||
|
||||
ulong regionHandle = Utils.UIntsToLong((uint)global_coords.x, (uint)global_coords.y);
|
||||
ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y);
|
||||
|
||||
if (UUID.TryParse(agent, out agentId))
|
||||
{
|
||||
|
||||
@@ -814,8 +814,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
private void TeleportAgent(string agent, int regionX, int regionY,
|
||||
LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions)
|
||||
{
|
||||
// ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
|
||||
ulong regionHandle = Util.RegionWorldLocToHandle(Util.RegionToWorldLoc((uint)regionX), Util.RegionToWorldLoc((uint)regionY));
|
||||
// ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
|
||||
ulong regionHandle = Util.RegionLocToHandle((uint)regionX, (uint)regionY);
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID agentId = new UUID();
|
||||
|
||||
@@ -713,16 +713,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
}
|
||||
private void Save()
|
||||
{
|
||||
/* Remove temporarily until we have a handle to the region size
|
||||
if (Position.x > ((int)Constants.RegionSize - 1))
|
||||
Position.x = ((int)Constants.RegionSize - 1);
|
||||
if (Position.x < 0)
|
||||
Position.x = 0;
|
||||
if (Position.y > ((int)Constants.RegionSize - 1))
|
||||
Position.y = ((int)Constants.RegionSize - 1);
|
||||
if (Position.y < 0)
|
||||
Position.y = 0;
|
||||
*/
|
||||
if (Position.z > Constants.RegionHeight)
|
||||
Position.z = Constants.RegionHeight;
|
||||
if (Position.x < 0)
|
||||
Position.x = 0;
|
||||
if (Position.y < 0)
|
||||
Position.y = 0;
|
||||
if (Position.z < 0)
|
||||
Position.z = 0;
|
||||
prim.OSSL.llSetPos(Position);
|
||||
|
||||
Reference in New Issue
Block a user