From 5d7751da891360c665622562f06a15e02fea4922 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 18 Aug 2012 01:17:01 +0100 Subject: refactoring for Vector3 operator & constructor tweaks --- OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 5c4174e..a1ad07d 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -152,9 +152,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine det[0] = new DetectParams(); det[0].Key = remoteClient.AgentId; det[0].Populate(myScriptEngine.World); - det[0].OffsetPos = new LSL_Types.Vector3(offsetPos.X, - offsetPos.Y, - offsetPos.Z); + det[0].OffsetPos = offsetPos; if (originalID == 0) { @@ -298,9 +296,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine foreach (DetectedObject detobj in col.Colliders) { DetectParams d = new DetectParams(); - d.Position = new LSL_Types.Vector3(detobj.posVector.X, - detobj.posVector.Y, - detobj.posVector.Z); + d.Position = detobj.posVector; d.Populate(myScriptEngine.World); det.Add(d); myScriptEngine.PostObjectEvent(localID, new EventParams( @@ -318,9 +314,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine foreach (DetectedObject detobj in col.Colliders) { DetectParams d = new DetectParams(); - d.Position = new LSL_Types.Vector3(detobj.posVector.X, - detobj.posVector.Y, - detobj.posVector.Z); + d.Position = detobj.posVector; d.Populate(myScriptEngine.World); det.Add(d); myScriptEngine.PostObjectEvent(localID, new EventParams( @@ -337,9 +331,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine foreach (DetectedObject detobj in col.Colliders) { DetectParams d = new DetectParams(); - d.Position = new LSL_Types.Vector3(detobj.posVector.X, - detobj.posVector.Y, - detobj.posVector.Z); + d.Position = detobj.posVector; d.Populate(myScriptEngine.World); det.Add(d); myScriptEngine.PostObjectEvent(localID, new EventParams( @@ -381,8 +373,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine myScriptEngine.PostObjectEvent(localID, new EventParams( "at_target", new object[] { new LSL_Types.LSLInteger(handle), - new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), - new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }, + new LSL_Types.Vector3(targetpos), + new LSL_Types.Vector3(atpos) }, new DetectParams[0])); } -- cgit v1.1 From ffdde05bb7d3d2ca71807c3197411bf66c29aa45 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 18 Aug 2012 15:10:44 +0100 Subject: constructor means not having to manually refer to individual properties --- OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index a1ad07d..cee10df 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -391,8 +391,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine myScriptEngine.PostObjectEvent(localID, new EventParams( "at_rot_target", new object[] { new LSL_Types.LSLInteger(handle), - new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W), - new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) }, + new LSL_Types.Quaternion(targetrot), + new LSL_Types.Quaternion(atrot) }, new DetectParams[0])); } -- cgit v1.1 From 14b659e550b4e24ecffa87fc28ee0196c36c73e3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 2 Oct 2012 01:17:46 +0100 Subject: Send money() events to the clicked prim. Reverting a change I made over a year ago. --- OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index cee10df..74baaf9 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_log.Debug("Paid: " + objectID + " from " + agentID + ", amount " + amount); - part = part.ParentGroup.RootPart; +// part = part.ParentGroup.RootPart; money(part.LocalId, agentID, amount); } -- cgit v1.1 From 54ec8b197b9119d0443bed0797563a88bdf49f6f Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 2 Oct 2012 01:25:55 +0100 Subject: Add money event routing to the script engine. --- OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/XEngine/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 74baaf9..9405075 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -96,6 +96,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (part == null) return; + if ((part.ScriptEvents & scriptEvents.money) == 0) + part = part.ParentGroup.RootPart; + m_log.Debug("Paid: " + objectID + " from " + agentID + ", amount " + amount); // part = part.ParentGroup.RootPart; -- cgit v1.1