aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-17 23:50:21 +0000
committerMelanie Thielker2008-09-17 23:50:21 +0000
commit66febc47ad0d2db2b9a676a71f757b67623b7b9a (patch)
tree00f42c3d4dc7359921ac126a1dba2ee7befa1e10 /OpenSim/Region/ScriptEngine/Shared/Api
parentAdd various XML elements to the data snapshot. Changes by Fly-Man and (diff)
downloadopensim-SC-66febc47ad0d2db2b9a676a71f757b67623b7b9a.zip
opensim-SC-66febc47ad0d2db2b9a676a71f757b67623b7b9a.tar.gz
opensim-SC-66febc47ad0d2db2b9a676a71f757b67623b7b9a.tar.bz2
opensim-SC-66febc47ad0d2db2b9a676a71f757b67623b7b9a.tar.xz
Kan-Ed fix series. Fix up llRezAtRoot and llRezObject, fix llCreateLink
to send a full update and do a persistence save.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 2b19ae1..5ae8017 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2116,11 +2116,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2116 return; 2116 return;
2117 2117
2118 m_host.AddScriptLPS(1); 2118 m_host.AddScriptLPS(1);
2119 bool found = false;
2120
2121 // Instead of using return;, I'm using continue; because in our TaskInventory implementation
2122 // it's possible to have two items with the same task inventory name.
2123 // this is an easter egg of sorts.
2124 2119
2125 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 2120 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2126 { 2121 {
@@ -2130,7 +2125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2130 if (inv.Value.InvType != (int)InventoryType.Object) 2125 if (inv.Value.InvType != (int)InventoryType.Object)
2131 { 2126 {
2132 llSay(0, "Unable to create requested object. Object is missing from database."); 2127 llSay(0, "Unable to create requested object. Object is missing from database.");
2133 continue; 2128 return;
2134 } 2129 }
2135 2130
2136 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z); 2131 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
@@ -2165,15 +2160,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2165 2160
2166 //Recoil. 2161 //Recoil.
2167 llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); 2162 llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
2168 found = true;
2169 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 2163 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
2170 ScriptSleep((int)((groupmass * velmag) / 10)); 2164 ScriptSleep((int)((groupmass * velmag) / 10));
2171 // ScriptSleep(100); 2165 // ScriptSleep(100);
2172 break; 2166 return;
2173 } 2167 }
2174 } 2168 }
2175 if (!found) 2169 llSay(0, "Could not find object " + inventory);
2176 llSay(0, "Could not find object " + inventory);
2177 } 2170 }
2178 2171
2179 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2172 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
@@ -2830,6 +2823,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2830 } 2823 }
2831 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 2824 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2832 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); 2825 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
2826 parentPrim.HasGroupChanged = true;
2827 parentPrim.ScheduleGroupForFullUpdate();
2833 parentPrim.GetProperties(client); 2828 parentPrim.GetProperties(client);
2834 2829
2835 ScriptSleep(1000); 2830 ScriptSleep(1000);