diff options
author | SignpostMarv | 2012-08-18 01:17:01 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:21:55 +0100 |
commit | 5d7751da891360c665622562f06a15e02fea4922 (patch) | |
tree | 7c0439407e246f298c8258a4b4c4e37c27fd92eb /OpenSim/Region/ScriptEngine/XEngine | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-5d7751da891360c665622562f06a15e02fea4922.zip opensim-SC_OLD-5d7751da891360c665622562f06a15e02fea4922.tar.gz opensim-SC_OLD-5d7751da891360c665622562f06a15e02fea4922.tar.bz2 opensim-SC_OLD-5d7751da891360c665622562f06a15e02fea4922.tar.xz |
refactoring for Vector3 operator & constructor tweaks
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 |
2 files changed, 8 insertions, 16 deletions
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 | |||
152 | det[0] = new DetectParams(); | 152 | det[0] = new DetectParams(); |
153 | det[0].Key = remoteClient.AgentId; | 153 | det[0].Key = remoteClient.AgentId; |
154 | det[0].Populate(myScriptEngine.World); | 154 | det[0].Populate(myScriptEngine.World); |
155 | det[0].OffsetPos = new LSL_Types.Vector3(offsetPos.X, | 155 | det[0].OffsetPos = offsetPos; |
156 | offsetPos.Y, | ||
157 | offsetPos.Z); | ||
158 | 156 | ||
159 | if (originalID == 0) | 157 | if (originalID == 0) |
160 | { | 158 | { |
@@ -298,9 +296,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
298 | foreach (DetectedObject detobj in col.Colliders) | 296 | foreach (DetectedObject detobj in col.Colliders) |
299 | { | 297 | { |
300 | DetectParams d = new DetectParams(); | 298 | DetectParams d = new DetectParams(); |
301 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | 299 | d.Position = detobj.posVector; |
302 | detobj.posVector.Y, | ||
303 | detobj.posVector.Z); | ||
304 | d.Populate(myScriptEngine.World); | 300 | d.Populate(myScriptEngine.World); |
305 | det.Add(d); | 301 | det.Add(d); |
306 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 302 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
@@ -318,9 +314,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
318 | foreach (DetectedObject detobj in col.Colliders) | 314 | foreach (DetectedObject detobj in col.Colliders) |
319 | { | 315 | { |
320 | DetectParams d = new DetectParams(); | 316 | DetectParams d = new DetectParams(); |
321 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | 317 | d.Position = detobj.posVector; |
322 | detobj.posVector.Y, | ||
323 | detobj.posVector.Z); | ||
324 | d.Populate(myScriptEngine.World); | 318 | d.Populate(myScriptEngine.World); |
325 | det.Add(d); | 319 | det.Add(d); |
326 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 320 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
@@ -337,9 +331,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
337 | foreach (DetectedObject detobj in col.Colliders) | 331 | foreach (DetectedObject detobj in col.Colliders) |
338 | { | 332 | { |
339 | DetectParams d = new DetectParams(); | 333 | DetectParams d = new DetectParams(); |
340 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | 334 | d.Position = detobj.posVector; |
341 | detobj.posVector.Y, | ||
342 | detobj.posVector.Z); | ||
343 | d.Populate(myScriptEngine.World); | 335 | d.Populate(myScriptEngine.World); |
344 | det.Add(d); | 336 | det.Add(d); |
345 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 337 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
@@ -381,8 +373,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
381 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 373 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
382 | "at_target", new object[] { | 374 | "at_target", new object[] { |
383 | new LSL_Types.LSLInteger(handle), | 375 | new LSL_Types.LSLInteger(handle), |
384 | new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), | 376 | new LSL_Types.Vector3(targetpos), |
385 | new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }, | 377 | new LSL_Types.Vector3(atpos) }, |
386 | new DetectParams[0])); | 378 | new DetectParams[0])); |
387 | } | 379 | } |
388 | 380 | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 1571fb4..a05650a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1467,7 +1467,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1467 | else if (p[i] is string) | 1467 | else if (p[i] is string) |
1468 | lsl_p[i] = new LSL_Types.LSLString((string)p[i]); | 1468 | lsl_p[i] = new LSL_Types.LSLString((string)p[i]); |
1469 | else if (p[i] is Vector3) | 1469 | else if (p[i] is Vector3) |
1470 | lsl_p[i] = new LSL_Types.Vector3(((Vector3)p[i]).X, ((Vector3)p[i]).Y, ((Vector3)p[i]).Z); | 1470 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); |
1471 | else if (p[i] is Quaternion) | 1471 | else if (p[i] is Quaternion) |
1472 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); | 1472 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); |
1473 | else if (p[i] is float) | 1473 | else if (p[i] is float) |
@@ -1493,7 +1493,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1493 | else if (p[i] is string) | 1493 | else if (p[i] is string) |
1494 | lsl_p[i] = new LSL_Types.LSLString((string)p[i]); | 1494 | lsl_p[i] = new LSL_Types.LSLString((string)p[i]); |
1495 | else if (p[i] is Vector3) | 1495 | else if (p[i] is Vector3) |
1496 | lsl_p[i] = new LSL_Types.Vector3(((Vector3)p[i]).X, ((Vector3)p[i]).Y, ((Vector3)p[i]).Z); | 1496 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); |
1497 | else if (p[i] is Quaternion) | 1497 | else if (p[i] is Quaternion) |
1498 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); | 1498 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); |
1499 | else if (p[i] is float) | 1499 | else if (p[i] is float) |