From 3358d70c5b174b2b9ac1216e9e43497279982805 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 20 Apr 2008 04:19:44 +0000 Subject: * Updates LSL2CS converter * All objects are not touchable by default now * When a script listens for one of the touch events in the state, an object becomes touchable. * All LSL scripts report which events they consume now ** This uses semi-complicated Regex to discover the events, stick them in a dictionary, and then write a method call into each script state's state_entry() event. ** Tedd may figure out a better way to do this in the future. For now, this works for LSL. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index b42375f..61d10c9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -83,6 +83,7 @@ namespace OpenSim.Region.Environment.Scenes SCALE = 0x40 } + [Serializable] public partial class SceneObjectPart : IScriptHost, ISerializable { @@ -729,8 +730,7 @@ namespace OpenSim.Region.Environment.Scenes m_folderID = LLUUID.Random(); Flags = 0; - Flags |= LLObject.ObjectFlags.Touch | - LLObject.ObjectFlags.AllowInventoryDrop | + Flags |= LLObject.ObjectFlags.AllowInventoryDrop | LLObject.ObjectFlags.CreateSelected; @@ -774,7 +774,7 @@ namespace OpenSim.Region.Environment.Scenes // Since we don't store script state, this is only a 'temporary' objectflag now // If the object is scripted, the script will get loaded and this will be set again - ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; + ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); TrimPermissions(); // ApplyPhysics(); @@ -2312,6 +2312,14 @@ namespace OpenSim.Region.Environment.Scenes SetText( text ); } + public void setScriptEvents(LLUUID scriptID, int events) + { + if (m_parentGroup != null) + { + m_parentGroup.SetScriptEvents(scriptID, events); + } + } + protected SceneObjectPart(SerializationInfo info, StreamingContext context) { //System.Console.WriteLine("SceneObjectPart Deserialize BGN"); -- cgit v1.1