diff options
author | Melanie | 2012-07-15 20:55:54 +0200 |
---|---|---|
committer | Melanie | 2012-07-15 20:55:54 +0200 |
commit | 8baf4dcc786b91a427e60dca9f0d0eeb05ddae19 (patch) | |
tree | e46c120f6efb9eb9b4c1b6fc82433ed6079ad471 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Replace sit position and rotation code with older, working version (diff) | |
download | opensim-SC-8baf4dcc786b91a427e60dca9f0d0eeb05ddae19.zip opensim-SC-8baf4dcc786b91a427e60dca9f0d0eeb05ddae19.tar.gz opensim-SC-8baf4dcc786b91a427e60dca9f0d0eeb05ddae19.tar.bz2 opensim-SC-8baf4dcc786b91a427e60dca9f0d0eeb05ddae19.tar.xz |
Reinstate older set rotation code for avatars since it works in all cases
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b20ca6d..5bade25 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8000,7 +8000,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8000 | //This is a special version of SetPrimParams to deal with avatars which are sat on the linkset. | 8000 | //This is a special version of SetPrimParams to deal with avatars which are sat on the linkset. |
8001 | 8001 | ||
8002 | int idx = 0; | 8002 | int idx = 0; |
8003 | SceneObjectPart sitpart = World.GetSceneObjectPart(av.ParentID); // betting this will be used | ||
8004 | 8003 | ||
8005 | bool positionChanged = false; | 8004 | bool positionChanged = false; |
8006 | Vector3 finalPos = Vector3.Zero; | 8005 | Vector3 finalPos = Vector3.Zero; |
@@ -8049,6 +8048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8049 | } | 8048 | } |
8050 | break; | 8049 | break; |
8051 | 8050 | ||
8051 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
8052 | case (int)ScriptBaseClass.PRIM_ROTATION: | 8052 | case (int)ScriptBaseClass.PRIM_ROTATION: |
8053 | { | 8053 | { |
8054 | if (remain < 1) | 8054 | if (remain < 1) |
@@ -8071,27 +8071,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8071 | } | 8071 | } |
8072 | break; | 8072 | break; |
8073 | 8073 | ||
8074 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
8075 | { | ||
8076 | if (remain < 1) | ||
8077 | return; | ||
8078 | |||
8079 | if (sitpart == null) | ||
8080 | break; | ||
8081 | |||
8082 | LSL_Rotation r = rules.GetQuaternionItem(idx++); | ||
8083 | Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested offset rotation | ||
8084 | if (sitpart != sitpart.ParentGroup.RootPart) | ||
8085 | { | ||
8086 | Quaternion srot = sitpart.RotationOffset; | ||
8087 | rot = Quaternion.Conjugate(srot) * rot; // remove sit part offset rotation | ||
8088 | } | ||
8089 | av.Rotation = rot; | ||
8090 | // av.SendAvatarDataToAllAgents(); | ||
8091 | av.SendTerseUpdateToAllClients(); | ||
8092 | } | ||
8093 | break; | ||
8094 | |||
8095 | // parse rest doing nothing but number of parameters error check | 8074 | // parse rest doing nothing but number of parameters error check |
8096 | case (int)ScriptBaseClass.PRIM_SIZE: | 8075 | case (int)ScriptBaseClass.PRIM_SIZE: |
8097 | case (int)ScriptBaseClass.PRIM_MATERIAL: | 8076 | case (int)ScriptBaseClass.PRIM_MATERIAL: |