diff options
author | Kitto Flora | 2009-12-22 00:33:31 -0500 |
---|---|---|
committer | Kitto Flora | 2009-12-22 00:33:31 -0500 |
commit | 93b930b9370b1439c4416c08a45fe7f23a5862c7 (patch) | |
tree | e3546d86b64e9e2c13c4fba40a364857bfb0a8e7 /OpenSim/Region/ScriptEngine | |
parent | Include ChOdePlugin (diff) | |
parent | Should not commit without compiling (diff) | |
download | opensim-SC-93b930b9370b1439c4416c08a45fe7f23a5862c7.zip opensim-SC-93b930b9370b1439c4416c08a45fe7f23a5862c7.tar.gz opensim-SC-93b930b9370b1439c4416c08a45fe7f23a5862c7.tar.bz2 opensim-SC-93b930b9370b1439c4416c08a45fe7f23a5862c7.tar.xz |
Fix conflicts
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2da498a..28932b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2742,7 +2742,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2742 | 2742 | ||
2743 | } | 2743 | } |
2744 | 2744 | ||
2745 | |||
2746 | public void llStopLookAt() | 2745 | public void llStopLookAt() |
2747 | { | 2746 | { |
2748 | m_host.AddScriptLPS(1); | 2747 | m_host.AddScriptLPS(1); |
@@ -5866,7 +5865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5866 | m_host.AddScriptLPS(1); | 5865 | m_host.AddScriptLPS(1); |
5867 | return World.SimulatorFPS; | 5866 | return World.SimulatorFPS; |
5868 | } | 5867 | } |
5869 | 5868 | ||
5870 | 5869 | ||
5871 | /* particle system rules should be coming into this routine as doubles, that is | 5870 | /* particle system rules should be coming into this routine as doubles, that is |
5872 | rule[0] should be an integer from this list and rule[1] should be the arg | 5871 | rule[0] should be an integer from this list and rule[1] should be the arg |
@@ -7467,9 +7466,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7467 | break; | 7466 | break; |
7468 | 7467 | ||
7469 | case (int)ScriptBaseClass.PRIM_POSITION: | 7468 | case (int)ScriptBaseClass.PRIM_POSITION: |
7470 | res.Add(new LSL_Vector(part.AbsolutePosition.X, | 7469 | LSL_Vector v = new LSL_Vector(part.AbsolutePosition.X, |
7471 | part.AbsolutePosition.Y, | 7470 | part.AbsolutePosition.Y, |
7472 | part.AbsolutePosition.Z)); | 7471 | part.AbsolutePosition.Z); |
7472 | // For some reason, the part.AbsolutePosition.* values do not change if the | ||
7473 | // linkset is rotated; they always reflect the child prim's world position | ||
7474 | // as though the linkset is unrotated. This is incompatible behavior with SL's | ||
7475 | // implementation, so will break scripts imported from there (not to mention it | ||
7476 | // makes it more difficult to determine a child prim's actual inworld position). | ||
7477 | if (part.ParentID != 0) | ||
7478 | v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); | ||
7479 | res.Add( v ); | ||
7473 | break; | 7480 | break; |
7474 | 7481 | ||
7475 | case (int)ScriptBaseClass.PRIM_SIZE: | 7482 | case (int)ScriptBaseClass.PRIM_SIZE: |
@@ -7487,6 +7494,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7487 | PrimitiveBaseShape Shape = part.Shape; | 7494 | PrimitiveBaseShape Shape = part.Shape; |
7488 | int primType = getScriptPrimType(part.Shape); | 7495 | int primType = getScriptPrimType(part.Shape); |
7489 | res.Add(new LSL_Integer(primType)); | 7496 | res.Add(new LSL_Integer(primType)); |
7497 | double topshearx = (double)(sbyte)Shape.PathShearX / 100.0; // Fix negative values for PathShearX | ||
7498 | double topsheary = (double)(sbyte)Shape.PathShearY / 100.0; // and PathShearY. | ||
7490 | switch (primType) | 7499 | switch (primType) |
7491 | { | 7500 | { |
7492 | case ScriptBaseClass.PRIM_TYPE_BOX: | 7501 | case ScriptBaseClass.PRIM_TYPE_BOX: |
@@ -7497,7 +7506,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7497 | res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); | 7506 | res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); |
7498 | res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); | 7507 | res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); |
7499 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); | 7508 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); |
7500 | res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); | 7509 | res.Add(new LSL_Vector(topshearx, topsheary, 0)); |
7501 | break; | 7510 | break; |
7502 | 7511 | ||
7503 | case ScriptBaseClass.PRIM_TYPE_SPHERE: | 7512 | case ScriptBaseClass.PRIM_TYPE_SPHERE: |
@@ -7532,7 +7541,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7532 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); | 7541 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); |
7533 | 7542 | ||
7534 | // vector topshear | 7543 | // vector topshear |
7535 | res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); | 7544 | res.Add(new LSL_Vector(topshearx, topsheary, 0)); |
7536 | 7545 | ||
7537 | // vector profilecut | 7546 | // vector profilecut |
7538 | res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); | 7547 | res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); |
@@ -7541,8 +7550,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7541 | res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); | 7550 | res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); |
7542 | 7551 | ||
7543 | // float revolutions | 7552 | // float revolutions |
7544 | res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :( | 7553 | res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned |
7545 | 7554 | // byte is being used to represent the entire | |
7555 | // range of floating-point values from 1.0 | ||
7556 | // through 4.0 (which is how SL does it). | ||
7557 | |||
7546 | // float radiusoffset | 7558 | // float radiusoffset |
7547 | res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); | 7559 | res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); |
7548 | 7560 | ||