From 9b2a4e81722d49ddb6552e279c355e13b8ed2b63 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 3 Apr 2007 18:15:11 +0000 Subject: 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 "" (without the quotes) , then save that and then drag it from your inventory to the prim you want to add the script to. --- OpenSim.RegionServer/SimClient.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim.RegionServer/SimClient.cs') diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 58cc625..6c64731 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -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; -- cgit v1.1