aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorRobert Adams2013-12-26 22:45:59 -0800
committerRobert Adams2013-12-26 22:45:59 -0800
commit2d2bea4aa75ff6e82384f0842fe3719bf946b1cc (patch)
tree9c1429ad59674925944ece4ec366888794e91822 /OpenSim/Region/ScriptEngine
parentvarregion: add lots of DEBUG level log messages. Especially for teleport. (diff)
downloadopensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.zip
opensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.gz
opensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.bz2
opensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
3 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6861865..674885c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4333,7 +4333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4333 m_host.AddScriptLPS(1); 4333 m_host.AddScriptLPS(1);
4334 UUID agentId = new UUID(); 4334 UUID agentId = new UUID();
4335 4335
4336 ulong regionHandle = Utils.UIntsToLong((uint)global_coords.x, (uint)global_coords.y); 4336 ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y);
4337 4337
4338 if (UUID.TryParse(agent, out agentId)) 4338 if (UUID.TryParse(agent, out agentId))
4339 { 4339 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 4fb0856..31ea067 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -814,8 +814,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
814 private void TeleportAgent(string agent, int regionX, int regionY, 814 private void TeleportAgent(string agent, int regionX, int regionY,
815 LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) 815 LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions)
816 { 816 {
817 // ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); 817 // ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
818 ulong regionHandle = Util.RegionWorldLocToHandle(Util.RegionToWorldLoc((uint)regionX), Util.RegionToWorldLoc((uint)regionY)); 818 ulong regionHandle = Util.RegionLocToHandle((uint)regionX, (uint)regionY);
819 819
820 m_host.AddScriptLPS(1); 820 m_host.AddScriptLPS(1);
821 UUID agentId = new UUID(); 821 UUID agentId = new UUID();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index e3f3fc7..d81cddc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -713,16 +713,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
713 } 713 }
714 private void Save() 714 private void Save()
715 { 715 {
716 /* Remove temporarily until we have a handle to the region size
716 if (Position.x > ((int)Constants.RegionSize - 1)) 717 if (Position.x > ((int)Constants.RegionSize - 1))
717 Position.x = ((int)Constants.RegionSize - 1); 718 Position.x = ((int)Constants.RegionSize - 1);
718 if (Position.x < 0)
719 Position.x = 0;
720 if (Position.y > ((int)Constants.RegionSize - 1)) 719 if (Position.y > ((int)Constants.RegionSize - 1))
721 Position.y = ((int)Constants.RegionSize - 1); 720 Position.y = ((int)Constants.RegionSize - 1);
722 if (Position.y < 0) 721 */
723 Position.y = 0;
724 if (Position.z > Constants.RegionHeight) 722 if (Position.z > Constants.RegionHeight)
725 Position.z = Constants.RegionHeight; 723 Position.z = Constants.RegionHeight;
724 if (Position.x < 0)
725 Position.x = 0;
726 if (Position.y < 0)
727 Position.y = 0;
726 if (Position.z < 0) 728 if (Position.z < 0)
727 Position.z = 0; 729 Position.z = 0;
728 prim.OSSL.llSetPos(Position); 730 prim.OSSL.llSetPos(Position);