add osResetAllScripts(LSL_Integer AllLinkset). use with care

0.9.1.0-post-fixes
UbitUmarov 2019-10-11 00:01:59 +01:00
parent 55d70f5df7
commit 2c1909a873
5 changed files with 126 additions and 27 deletions

View File

@ -5560,5 +5560,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return LSL_Rotation.Slerp(a, b, amount); return LSL_Rotation.Slerp(a, b, amount);
} }
public void osResetAllScripts(LSL_Integer linkset)
{
UUID me = m_item.ItemID;
List<TaskInventoryItem> scripts = new List<TaskInventoryItem>();
if(linkset != 0)
{
SceneObjectGroup sog = m_host.ParentGroup;
if(sog.inTransit || sog.IsDeleted)
return;
SceneObjectPart[] parts = sog.Parts;
for (int i = 0; i < parts.Length; i++)
{
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
}
}
else
scripts.AddRange(m_host.Inventory.GetInventoryItems(InventoryType.LSL));
foreach(TaskInventoryItem script in scripts)
{
if(script.ItemID == me)
continue;
m_ScriptEngine.ResetScript(script.ItemID);
}
if (m_UrlModule != null)
m_UrlModule.ScriptRemoved(me);
m_ScriptEngine.ApiResetScript(me);
}
} }
} }

View File

@ -556,5 +556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Key osGetLastChangedEventKey(); LSL_Key osGetLastChangedEventKey();
LSL_Float osGetPSTWallclock(); LSL_Float osGetPSTWallclock();
LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount); LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount);
void osResetAllScripts(LSL_Integer AllLinkset);
} }
} }

View File

@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public partial class ScriptBaseClass public partial class ScriptBaseClass
{ {
// SCRIPTS CONSTANTS // SCRIPTS CONSTANTS
public static readonly LSLInteger OS_APIVERSION = 8; public static readonly LSLInteger OS_APIVERSION = 9;
public static readonly LSLInteger TRUE = 1; public static readonly LSLInteger TRUE = 1;
public static readonly LSLInteger FALSE = 0; public static readonly LSLInteger FALSE = 0;

View File

@ -1412,5 +1412,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_OSSL_Functions.osSlerp(a, b, amount); return m_OSSL_Functions.osSlerp(a, b, amount);
} }
public void osResetAllScripts(LSL_Integer allLinkSet)
{
m_OSSL_Functions.osResetAllScripts(allLinkSet);
}
} }
} }

View File

@ -1,4 +1,4 @@
4c3dbda3-bc1e-b0f0-c532-2c6daf1e2343 dfadabce-becc-8749-2b74-781332befa2e
<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer> <llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
<key>controls</key> <key>controls</key>
<map> <map>
@ -1027,6 +1027,50 @@
<key>type</key><string>integer</string> <key>type</key><string>integer</string>
<key>value</key><string>3</string> <key>value</key><string>3</string>
</map> </map>
<key>IMG_USE_BAKED_AUX1</key><map>
<key>type</key><string>string</string>
<key>value</key><string>9742065b-19b5-297c-858a-29711d539043</string>
</map>
<key>IMG_USE_BAKED_AUX2</key><map>
<key>type</key><string>string</string>
<key>value</key><string>03642e83-2bd1-4eb9-34b4-4c47ed586d2d</string>
</map>
<key>IMG_USE_BAKED_AUX3</key><map>
<key>type</key><string>string</string>
<key>value</key><string>edd51b77-fc10-ce7a-4b3d-011dfc349e4f</string>
</map>
<key>IMG_USE_BAKED_EYES</key><map>
<key>type</key><string>string</string>
<key>value</key><string>52cc6bb6-2ee5-e632-d3ad-50197b1dcb8a</string>
</map>
<key>IMG_USE_BAKED_HAIR</key><map>
<key>type</key><string>string</string>
<key>value</key><string>09aac1fb-6bce-0bee-7d44-caac6dbb6c63</string>
</map>
<key>IMG_USE_BAKED_HEAD</key><map>
<key>type</key><string>string</string>
<key>value</key><string>5a9f4a74-30f2-821c-b88d-70499d3e7183</string>
</map>
<key>IMG_USE_BAKED_LEFTARM</key><map>
<key>type</key><string>string</string>
<key>value</key><string>ff62763f-d60a-9855-890b-0c96f8f8cd98</string>
</map>
<key>IMG_USE_BAKED_LEFTLEG</key><map>
<key>type</key><string>string</string>
<key>value</key><string>8e915e25-31d1-cc95-ae08-d58a47488251</string>
</map>
<key>IMG_USE_BAKED_LOWER</key><map>
<key>type</key><string>string</string>
<key>value</key><string>24daea5f-0539-cfcf-047f-fbc40b2786ba</string>
</map>
<key>IMG_USE_BAKED_SKIRT</key><map>
<key>type</key><string>string</string>
<key>value</key><string>43529ce8-7faa-ad92-165a-bc4078371687</string>
</map>
<key>IMG_USE_BAKED_UPPER</key><map>
<key>type</key><string>string</string>
<key>value</key><string>ae2de45c-d252-50b8-5c6e-19f39ce79317</string>
</map>
<key>INVENTORY_ALL</key><map> <key>INVENTORY_ALL</key><map>
<key>type</key><string>integer</string> <key>type</key><string>integer</string>
<key>value</key><string>-1</string> <key>value</key><string>-1</string>
@ -1513,7 +1557,7 @@
</map> </map>
<key>OS_APIVERSION</key><map> <key>OS_APIVERSION</key><map>
<key>type</key><string>integer</string> <key>type</key><string>integer</string>
<key>value</key><string>6</string> <key>value</key><string>9</string>
</map> </map>
<key>OS_ATTACH_MSG_ALL</key><map> <key>OS_ATTACH_MSG_ALL</key><map>
<key>type</key><string>integer</string> <key>type</key><string>integer</string>
@ -6322,6 +6366,8 @@
<key>return</key><string>string</string> <key>return</key><string>string</string>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>drawList</key><map><key>type</key><string>string</string></map></map> <map><key>drawList</key><map><key>type</key><string>string</string></map></map>
<map><key>startX</key><map><key>type</key><string>integer</string></map></map>
<map><key>startY</key><map><key>type</key><string>integer</string></map></map>
<map><key>endX</key><map><key>type</key><string>integer</string></map></map> <map><key>endX</key><map><key>type</key><string>integer</string></map></map>
<map><key>endY</key><map><key>type</key><string>integer</string></map></map> <map><key>endY</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
@ -6331,8 +6377,6 @@
<key>return</key><string>string</string> <key>return</key><string>string</string>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>drawList</key><map><key>type</key><string>string</string></map></map> <map><key>drawList</key><map><key>type</key><string>string</string></map></map>
<map><key>startX</key><map><key>type</key><string>integer</string></map></map>
<map><key>startY</key><map><key>type</key><string>integer</string></map></map>
<map><key>endX</key><map><key>type</key><string>integer</string></map></map> <map><key>endX</key><map><key>type</key><string>integer</string></map></map>
<map><key>endY</key><map><key>type</key><string>integer</string></map></map> <map><key>endY</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
@ -6471,13 +6515,13 @@
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>avatar</key><map><key>type</key><string>string</string></map></map> <map><key>avatar</key><map><key>type</key><string>string</string></map></map>
<map><key>target</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
<key>osForceOtherSit</key> <key>osForceOtherSit</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>avatar</key><map><key>type</key><string>string</string></map></map> <map><key>avatar</key><map><key>type</key><string>string</string></map></map>
<map><key>target</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
<key>osFormatString</key> <key>osFormatString</key>
@ -6714,7 +6758,7 @@
<map> <map>
<key>return</key><string>key</string> <key>return</key><string>key</string>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>regionName</key><map><key>type</key><string>string</string></map></map> <map><key>regionNameOrID</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
<key>osGetRegionSize</key> <key>osGetRegionSize</key>
@ -7013,7 +7057,6 @@
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>npc</key><map><key>type</key><string>key</string></map></map> <map><key>npc</key><map><key>type</key><string>key</string></map></map>
<map><key>channel</key><map><key>type</key><string>integer</string></map></map>
<map><key>message</key><map><key>type</key><string>string</string></map></map> <map><key>message</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
@ -7021,6 +7064,7 @@
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>npc</key><map><key>type</key><string>key</string></map></map> <map><key>npc</key><map><key>type</key><string>key</string></map></map>
<map><key>channel</key><map><key>type</key><string>integer</string></map></map>
<map><key>message</key><map><key>type</key><string>string</string></map></map> <map><key>message</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
@ -7182,6 +7226,7 @@
<key>return</key><string>integer</string> <key>return</key><string>integer</string>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>seconds</key><map><key>type</key><string>float</string></map></map> <map><key>seconds</key><map><key>type</key><string>float</string></map></map>
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
<key>osRegionRestart</key> <key>osRegionRestart</key>
@ -7189,7 +7234,6 @@
<key>return</key><string>integer</string> <key>return</key><string>integer</string>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>seconds</key><map><key>type</key><string>float</string></map></map> <map><key>seconds</key><map><key>type</key><string>float</string></map></map>
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
</array> </array>
</map> </map>
<key>osReplaceString</key> <key>osReplaceString</key>
@ -7217,6 +7261,12 @@
<map><key>options</key><map><key>type</key><string>list</string></map></map> <map><key>options</key><map><key>type</key><string>list</string></map></map>
</array> </array>
</map> </map>
<key>osResetAllScripts</key>
<map>
<key>arguments</key><array>
<map><key>AllLinkset</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osRound</key> <key>osRound</key>
<map> <map>
<key>return</key><string>float</string> <key>return</key><string>float</string>
@ -7413,7 +7463,7 @@
<key>osSetProjectionParams</key> <key>osSetProjectionParams</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>prim</key><map><key>type</key><string>key</string></map></map> <map><key>linknumber</key><map><key>type</key><string>integer</string></map></map>
<map><key>projection</key><map><key>type</key><string>integer</string></map></map> <map><key>projection</key><map><key>type</key><string>integer</string></map></map>
<map><key>texture</key><map><key>type</key><string>key</string></map></map> <map><key>texture</key><map><key>type</key><string>key</string></map></map>
<map><key>fov</key><map><key>type</key><string>float</string></map></map> <map><key>fov</key><map><key>type</key><string>float</string></map></map>
@ -7424,7 +7474,7 @@
<key>osSetProjectionParams</key> <key>osSetProjectionParams</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>linknumber</key><map><key>type</key><string>integer</string></map></map> <map><key>prim</key><map><key>type</key><string>key</string></map></map>
<map><key>projection</key><map><key>type</key><string>integer</string></map></map> <map><key>projection</key><map><key>type</key><string>integer</string></map></map>
<map><key>texture</key><map><key>type</key><string>key</string></map></map> <map><key>texture</key><map><key>type</key><string>key</string></map></map>
<map><key>fov</key><map><key>type</key><string>float</string></map></map> <map><key>fov</key><map><key>type</key><string>float</string></map></map>
@ -7515,6 +7565,15 @@
<map><key>value</key><map><key>type</key><string>float</string></map></map> <map><key>value</key><map><key>type</key><string>float</string></map></map>
</array> </array>
</map> </map>
<key>osSlerp</key>
<map>
<key>return</key><string>rotation</string>
<key>arguments</key><array>
<map><key>a</key><map><key>type</key><string>rotation</string></map></map>
<map><key>b</key><map><key>type</key><string>rotation</string></map></map>
<map><key>amount</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osStopSound</key> <key>osStopSound</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
@ -7556,6 +7615,8 @@
<key>arguments</key><array> <key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map> <map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>value</key><map><key>type</key><string>string</string></map></map> <map><key>value</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map> <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
</map> </map>
@ -7565,8 +7626,6 @@
<key>arguments</key><array> <key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map> <map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>value</key><map><key>type</key><string>string</string></map></map> <map><key>value</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map> <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
</map> </map>
@ -7603,7 +7662,6 @@
<key>arguments</key><array> <key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map> <map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map> <map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>length</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
</map> </map>
<key>osStringSubString</key> <key>osStringSubString</key>
@ -7612,6 +7670,7 @@
<key>arguments</key><array> <key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map> <map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map> <map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>length</key><map><key>type</key><string>integer</string></map></map>
</array> </array>
</map> </map>
<key>osSunGetParam</key> <key>osSunGetParam</key>
@ -7629,16 +7688,6 @@
</array> </array>
</map> </map>
<key>osTeleportAgent</key> <key>osTeleportAgent</key>
<map>
<key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
<map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
<map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osTeleportAgent</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map> <map><key>agent</key><map><key>type</key><string>string</string></map></map>
@ -7655,6 +7704,16 @@
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map> <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array> </array>
</map> </map>
<key>osTeleportAgent</key>
<map>
<key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
<map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
<map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osTeleportObject</key> <key>osTeleportObject</key>
<map> <map>
<key>return</key><string>integer</string> <key>return</key><string>integer</string>
@ -7675,8 +7734,7 @@
<key>osTeleportOwner</key> <key>osTeleportOwner</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>regionX</key><map><key>type</key><string>integer</string></map></map> <map><key>regionName</key><map><key>type</key><string>string</string></map></map>
<map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map> <map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map> <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array> </array>
@ -7684,7 +7742,8 @@
<key>osTeleportOwner</key> <key>osTeleportOwner</key>
<map> <map>
<key>arguments</key><array> <key>arguments</key><array>
<map><key>regionName</key><map><key>type</key><string>string</string></map></map> <map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
<map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map> <map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map> <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array> </array>