aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJohn Hurliman2009-09-16 15:45:40 -0700
committerJohn Hurliman2009-09-16 17:17:40 -0700
commit39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0 (patch)
tree328265a2202540bc42941fcb87393d9534509a73 /OpenSim/Region/ScriptEngine
parentSceneObjectGroup cleanup. Removes the default constructor and unnecessary nul... (diff)
downloadopensim-SC_OLD-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.zip
opensim-SC_OLD-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.gz
opensim-SC_OLD-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.bz2
opensim-SC_OLD-39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0.tar.xz
* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs12
2 files changed, 9 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ba42678..39f620b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2004,10 +2004,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2004 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 2004 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
2005 } 2005 }
2006 else 2006 else
2007 q = part.ParentGroup.GroupRotation; // Likely never get here but just in case 2007 q = part.ParentGroup.Rotation; // Likely never get here but just in case
2008 } 2008 }
2009 else 2009 else
2010 q = part.ParentGroup.GroupRotation; // just the group rotation 2010 q = part.ParentGroup.Rotation; // just the group rotation
2011 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2011 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2012 } 2012 }
2013 q = part.GetWorldRotation(); 2013 q = part.GetWorldRotation();
@@ -7171,10 +7171,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7171 else 7171 else
7172 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 7172 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
7173 else 7173 else
7174 q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case 7174 q = m_host.ParentGroup.Rotation; // Likely never get here but just in case
7175 } 7175 }
7176 else 7176 else
7177 q = m_host.ParentGroup.GroupRotation; // just the group rotation 7177 q = m_host.ParentGroup.Rotation; // just the group rotation
7178 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 7178 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
7179 } 7179 }
7180 7180
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 4855d64..84ccafe 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -218,16 +218,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
218 } 218 }
219 } 219 }
220 220
221 Position = new LSL_Types.Vector3(part.AbsolutePosition.X, 221 Vector3 absPos = part.AbsolutePosition;
222 part.AbsolutePosition.Y, 222 Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z);
223 part.AbsolutePosition.Z);
224 223
225 Quaternion wr = part.ParentGroup.GroupRotation; 224 Quaternion wr = part.ParentGroup.Rotation;
226 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); 225 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
227 226
228 Velocity = new LSL_Types.Vector3(part.Velocity.X, 227 Vector3 vel = part.Velocity;
229 part.Velocity.Y, 228 Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z);
230 part.Velocity.Z);
231 } 229 }
232 } 230 }
233 231