aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs43
1 files changed, 25 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6e17639..669189d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -99,17 +99,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
99 m_localID = localID; 99 m_localID = localID;
100 m_itemID = itemID; 100 m_itemID = itemID;
101 101
102 m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); 102 m_ScriptDelayFactor =
103 m_ScriptDistanceFactor = m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); 103 m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
104 m_MinTimerInterval = m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f); 104 m_ScriptDistanceFactor =
105 m_automaticLinkPermission = m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false); 105 m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
106 m_scriptConsoleChannel = m_ScriptEngine.Config.GetInt("ScriptConsoleChannel", 0); 106 m_MinTimerInterval =
107 m_scriptConsoleChannelEnabled = (m_scriptConsoleChannel != 0); 107 m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
108 m_notecardLineReadCharsMax = m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255); 108 m_automaticLinkPermission =
109 m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
110 m_notecardLineReadCharsMax =
111 m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
109 if (m_notecardLineReadCharsMax > 65535) 112 if (m_notecardLineReadCharsMax > 65535)
110 m_notecardLineReadCharsMax = 65535; 113 m_notecardLineReadCharsMax = 65535;
111 114
112 m_TransferModule = m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>(); 115 m_TransferModule =
116 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
113 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>(); 117 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
114 if (m_UrlModule != null) 118 if (m_UrlModule != null)
115 { 119 {
@@ -1263,12 +1267,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1263 protected void SetScale(SceneObjectPart part, LSL_Vector scale) 1267 protected void SetScale(SceneObjectPart part, LSL_Vector scale)
1264 { 1268 {
1265 // TODO: this needs to trigger a persistance save as well 1269 // TODO: this needs to trigger a persistance save as well
1266
1267 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 1270 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
1268 return; 1271 return;
1269 1272 if (scale.x < 0.01)
1270 if (scale.x < 0.01 || scale.y < 0.01 || scale.z < 0.01) 1273 scale.x = 0.01;
1271 return; 1274 if (scale.y < 0.01)
1275 scale.y = 0.01;
1276 if (scale.z < 0.01)
1277 scale.z = 0.01;
1272 1278
1273 if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) 1279 if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
1274 { 1280 {
@@ -1279,12 +1285,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1279 if (scale.z > World.m_maxPhys) 1285 if (scale.z > World.m_maxPhys)
1280 scale.z = World.m_maxPhys; 1286 scale.z = World.m_maxPhys;
1281 } 1287 }
1288
1282 if (scale.x > World.m_maxNonphys) 1289 if (scale.x > World.m_maxNonphys)
1283 scale.x = World.m_maxNonphys; 1290 scale.x = World.m_maxNonphys;
1284 if (scale.y > World.m_maxNonphys) 1291 if (scale.y > World.m_maxNonphys)
1285 scale.y = World.m_maxNonphys; 1292 scale.y = World.m_maxNonphys;
1286 if (scale.z > World.m_maxNonphys) 1293 if (scale.z > World.m_maxNonphys)
1287 scale.z = World.m_maxNonphys; 1294 scale.z = World.m_maxNonphys;
1295
1288 Vector3 tmp = part.Scale; 1296 Vector3 tmp = part.Scale;
1289 tmp.X = (float)scale.x; 1297 tmp.X = (float)scale.x;
1290 tmp.Y = (float)scale.y; 1298 tmp.Y = (float)scale.y;
@@ -1975,7 +1983,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1975 { 1983 {
1976 part.UpdateRotation(rot); 1984 part.UpdateRotation(rot);
1977 // Update rotation does not move the object in the physics scene if it's a linkset. 1985 // Update rotation does not move the object in the physics scene if it's a linkset.
1978 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1986
1987//KF: Do NOT use this next line if using ODE physics engine. This need a switch based on .ini Phys Engine type
1988// part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1979 } 1989 }
1980 1990
1981 /// <summary> 1991 /// <summary>
@@ -6759,15 +6769,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6759 // try to let this work as in SL... 6769 // try to let this work as in SL...
6760 if (part.ParentID == 0) 6770 if (part.ParentID == 0)
6761 { 6771 {
6762 // special case: If we are root, rotate 6772 // special case: If we are root, rotate complete SOG to new rotation
6763 // complete SOG to new rotation
6764 SetRot(part, Rot2Quaternion(q)); 6773 SetRot(part, Rot2Quaternion(q));
6765 } 6774 }
6766 else 6775 else
6767 { 6776 {
6768 // we are a child. The rotation values 6777 // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
6769 // will be set to the one of root modified
6770 // by rot, as in SL. Don't ask.
6771 SceneObjectGroup group = part.ParentGroup; 6778 SceneObjectGroup group = part.ParentGroup;
6772 if (group != null) // a bit paranoid, maybe 6779 if (group != null) // a bit paranoid, maybe
6773 { 6780 {