Added easier way to add "scripts" to prims: to add Libsa71's test script, create a new note and delete the contents of the created note and then add "<Script>Test</Script>" (without the quotes) , then save that and then drag it from your inventory to the prim you want to add the script to.

This commit is contained in:
MW
2007-04-03 18:15:11 +00:00
parent 5ab7205dc5
commit 9b2a4e8172
2 changed files with 88 additions and 1 deletions

View File

@@ -436,6 +436,32 @@ namespace OpenSim
this.OutPacket(replytask);
}
break;
case PacketType.UpdateTaskInventory:
Console.WriteLine(Pack.ToString());
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
if (myinventory != null)
{
if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null)
{
if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7)
{
LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID;
AssetBase assBase = this.m_assetCache.GetAsset(noteaid);
if (assBase != null)
{
foreach (Entity ent in m_world.Entities.Values)
{
if (ent.localid == updatetask.UpdateData.LocalID)
{
this.m_world.AddScript(ent, Helpers.FieldToString(assBase.Data));
}
}
}
}
}
}
break;
case PacketType.AgentAnimation:
//Console.WriteLine(Pack.ToString());
break;