aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2010-09-13 16:16:40 +0100
committerMelanie2010-09-13 16:17:38 +0100
commit6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e (patch)
tree1e7bf4fddcf559886c6b2babf13cf4b2ca8829a1 /OpenSim/Region/ScriptEngine
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
parentFix unit test SceneSetupHelpers to load the mock simulation data store (diff)
downloadopensim-SC_OLD-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.zip
opensim-SC_OLD-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.gz
opensim-SC_OLD-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.bz2
opensim-SC_OLD-6a1ce17cdbf143f11262e1194b6a6d9e5bb1077e.tar.xz
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please don't use until I do the companion commit to modules later on.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs2
4 files changed, 13 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 512957d..a5b3cd0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4298,9 +4298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4298 } 4298 }
4299 4299
4300 4300
4301 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); 4301 pinfo = World.PresenceService.GetAgent(uuid);
4302 if (pinfos != null && pinfos.Length > 0)
4303 pinfo = pinfos[0];
4304 4302
4305 ce = new UserInfoCacheEntry(); 4303 ce = new UserInfoCacheEntry();
4306 ce.time = Util.EnvironmentTickCount(); 4304 ce.time = Util.EnvironmentTickCount();
@@ -4319,11 +4317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4319 4317
4320 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) 4318 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000)
4321 { 4319 {
4322 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); 4320 pinfo = World.PresenceService.GetAgent(uuid);
4323 if (pinfos != null && pinfos.Length > 0)
4324 pinfo = pinfos[0];
4325 else
4326 pinfo = null;
4327 4321
4328 ce.time = Util.EnvironmentTickCount(); 4322 ce.time = Util.EnvironmentTickCount();
4329 ce.pinfo = pinfo; 4323 ce.pinfo = pinfo;
@@ -8482,7 +8476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8482 res.Add(new LSL_Integer((int)me.ControlPermissions)); 8476 res.Add(new LSL_Integer((int)me.ControlPermissions));
8483 break; 8477 break;
8484 } 8478 }
8485 } 8479 }
8486 8480
8487 return res; 8481 return res;
8488 } 8482 }
@@ -8498,7 +8492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8498 if (face < 0 || face > m_host.GetNumberOfSides() - 1) 8492 if (face < 0 || face > m_host.GetNumberOfSides() - 1)
8499 return ScriptBaseClass.LSL_STATUS_OK; 8493 return ScriptBaseClass.LSL_STATUS_OK;
8500 8494
8501 return SetPrimMediaParams(face, rules); 8495 return SetPrimMediaParams(face, rules);
8502 } 8496 }
8503 8497
8504 private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) 8498 private LSL_Integer SetPrimMediaParams(int face, LSL_List rules)
@@ -8587,7 +8581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8587 me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); 8581 me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
8588 break; 8582 break;
8589 } 8583 }
8590 } 8584 }
8591 8585
8592 module.SetMediaEntry(m_host, face, me); 8586 module.SetMediaEntry(m_host, face, me);
8593 8587
@@ -8607,7 +8601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8607 8601
8608 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); 8602 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
8609 if (null == module) 8603 if (null == module)
8610 throw new Exception("Media on a prim functions not available"); 8604 throw new Exception("Media on a prim functions not available");
8611 8605
8612 module.ClearMediaEntry(m_host, face); 8606 module.ClearMediaEntry(m_host, face);
8613 8607
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index a08b135..6827ede 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1197,7 +1197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1197 1197
1198 World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); 1198 World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID);
1199 } 1199 }
1200 1200
1201 public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) 1201 public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2)
1202 { 1202 {
1203 CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); 1203 CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide");
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1220 // can modify it 1220 // can modify it
1221 1221
1222 ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); 1222 ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y);
1223 if (startLandObject == null) 1223 if (startLandObject == null)
1224 { 1224 {
1225 OSSLShoutError("There is no land at that location"); 1225 OSSLShoutError("There is no land at that location");
1226 return; 1226 return;
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1237 UUID uuid; 1237 UUID uuid;
1238 1238
1239 // Process the rules, not sure what the impact would be of changing owner or group 1239 // Process the rules, not sure what the impact would be of changing owner or group
1240 for (int idx = 0; idx < rules.Length; ) 1240 for (int idx = 0; idx < rules.Length;)
1241 { 1241 {
1242 int code = rules.GetLSLIntegerItem(idx++); 1242 int code = rules.GetLSLIntegerItem(idx++);
1243 string arg = rules.GetLSLStringItem(idx++); 1243 string arg = rules.GetLSLStringItem(idx++);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index a5b1124..3b7de53 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -286,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
286 } 286 }
287 else 287 else
288 { 288 {
289 Entities = m_CmdManager.m_ScriptEngine.World.GetEntities(); 289 Entities = new List<EntityBase>(m_CmdManager.m_ScriptEngine.World.GetEntities());
290 } 290 }
291 SceneObjectPart SensePoint = ts.host; 291 SceneObjectPart SensePoint = ts.host;
292 292
@@ -417,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
417 List<SensedEntity> sensedEntities = new List<SensedEntity>(); 417 List<SensedEntity> sensedEntities = new List<SensedEntity>();
418 418
419 // If nobody about quit fast 419 // If nobody about quit fast
420 if(m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) 420 if (m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0)
421 return sensedEntities; 421 return sensedEntities;
422 422
423 SceneObjectPart SensePoint = ts.host; 423 SceneObjectPart SensePoint = ts.host;
@@ -496,7 +496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
496 { 496 {
497 ScenePresence sp; 497 ScenePresence sp;
498 // Try direct lookup by UUID 498 // Try direct lookup by UUID
499 if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) 499 if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp))
500 return sensedEntities; 500 return sensedEntities;
501 senseEntity(sp); 501 senseEntity(sp);
502 } 502 }
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index e5e8a56..e82d297 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -632,7 +632,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
632 bool postOnRez = (bool)p[4]; 632 bool postOnRez = (bool)p[4];
633 StateSource stateSource = (StateSource)p[5]; 633 StateSource stateSource = (StateSource)p[5];
634 634
635 lock(m_CompileDict) 635 lock (m_CompileDict)
636 { 636 {
637 if (!m_CompileDict.ContainsKey(itemID)) 637 if (!m_CompileDict.ContainsKey(itemID))
638 return false; 638 return false;