diff options
author | Melanie | 2009-11-04 23:29:42 +0000 |
---|---|---|
committer | Melanie | 2009-11-04 23:29:42 +0000 |
commit | a431f346e729dddc310f4a43f07ce599edc61ca0 (patch) | |
tree | e53dd04c0fd173ace890072529894554c7ee0556 /OpenSim/Region | |
parent | Refine oversized packet handling as per jhurliman. Reallocate the buffer to (diff) | |
parent | Initialize SceneObjectPart.RotationOffset to Quaternion.Identity (diff) | |
download | opensim-SC_OLD-a431f346e729dddc310f4a43f07ce599edc61ca0.zip opensim-SC_OLD-a431f346e729dddc310f4a43f07ce599edc61ca0.tar.gz opensim-SC_OLD-a431f346e729dddc310f4a43f07ce599edc61ca0.tar.bz2 opensim-SC_OLD-a431f346e729dddc310f4a43f07ce599edc61ca0.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
5 files changed, 24 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs index c2ec6a5..1c76c54 100644 --- a/OpenSim/Region/Framework/Scenes/EntityBase.cs +++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs | |||
@@ -94,14 +94,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
94 | set { m_velocity = value; } | 94 | set { m_velocity = value; } |
95 | } | 95 | } |
96 | 96 | ||
97 | protected Quaternion m_rotation = new Quaternion(0f, 0f, 1f, 0f); | ||
98 | |||
99 | public virtual Quaternion Rotation | ||
100 | { | ||
101 | get { return m_rotation; } | ||
102 | set { m_rotation = value; } | ||
103 | } | ||
104 | |||
105 | protected uint m_localId; | 97 | protected uint m_localId; |
106 | 98 | ||
107 | public virtual uint LocalId | 99 | public virtual uint LocalId |
@@ -115,13 +107,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
115 | /// </summary> | 107 | /// </summary> |
116 | public EntityBase() | 108 | public EntityBase() |
117 | { | 109 | { |
118 | m_uuid = UUID.Zero; | ||
119 | |||
120 | m_pos = Vector3.Zero; | ||
121 | m_velocity = Vector3.Zero; | ||
122 | Rotation = Quaternion.Identity; | ||
123 | m_name = "(basic entity)"; | 110 | m_name = "(basic entity)"; |
124 | m_rotationalvelocity = Vector3.Zero; | ||
125 | } | 111 | } |
126 | 112 | ||
127 | /// <summary> | 113 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c65a665..f938472 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -204,6 +204,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
204 | get { return m_parts.Count; } | 204 | get { return m_parts.Count; } |
205 | } | 205 | } |
206 | 206 | ||
207 | protected Quaternion m_rotation = Quaternion.Identity; | ||
208 | |||
209 | public virtual Quaternion Rotation | ||
210 | { | ||
211 | get { return m_rotation; } | ||
212 | set { m_rotation = value; } | ||
213 | } | ||
214 | |||
207 | public Quaternion GroupRotation | 215 | public Quaternion GroupRotation |
208 | { | 216 | { |
209 | get { return m_rootPart.RotationOffset; } | 217 | get { return m_rootPart.RotationOffset; } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2bc7f66..f47be99 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
243 | protected SceneObjectGroup m_parentGroup; | 243 | protected SceneObjectGroup m_parentGroup; |
244 | protected byte[] m_particleSystem = Utils.EmptyBytes; | 244 | protected byte[] m_particleSystem = Utils.EmptyBytes; |
245 | protected ulong m_regionHandle; | 245 | protected ulong m_regionHandle; |
246 | protected Quaternion m_rotationOffset; | 246 | protected Quaternion m_rotationOffset = Quaternion.Identity; |
247 | protected PrimitiveBaseShape m_shape; | 247 | protected PrimitiveBaseShape m_shape; |
248 | protected UUID m_uuid; | 248 | protected UUID m_uuid; |
249 | protected Vector3 m_velocity; | 249 | protected Vector3 m_velocity; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 124f4c0..1e9201e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -481,6 +481,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
481 | } | 481 | } |
482 | } | 482 | } |
483 | 483 | ||
484 | public Quaternion Rotation | ||
485 | { | ||
486 | get { return m_bodyRot; } | ||
487 | set { m_bodyRot = value; } | ||
488 | } | ||
489 | |||
484 | /// <summary> | 490 | /// <summary> |
485 | /// If this is true, agent doesn't have a representation in this scene. | 491 | /// If this is true, agent doesn't have a representation in this scene. |
486 | /// this is an agent 'looking into' this scene from a nearby scene(region) | 492 | /// this is an agent 'looking into' this scene from a nearby scene(region) |
@@ -2256,7 +2262,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2256 | 2262 | ||
2257 | m_perfMonMS = Environment.TickCount; | 2263 | m_perfMonMS = Environment.TickCount; |
2258 | 2264 | ||
2259 | m_rotation = rotation; | 2265 | Rotation = rotation; |
2260 | Vector3 direc = vec * rotation; | 2266 | Vector3 direc = vec * rotation; |
2261 | direc.Normalize(); | 2267 | direc.Normalize(); |
2262 | 2268 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 52396b6..f1ceb80 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -384,7 +384,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
384 | m_host.AddScriptLPS(1); | 384 | m_host.AddScriptLPS(1); |
385 | if (World.Entities.ContainsKey(target)) | 385 | if (World.Entities.ContainsKey(target)) |
386 | { | 386 | { |
387 | World.Entities[target].Rotation = rotation; | 387 | EntityBase entity; |
388 | if (World.Entities.TryGetValue(target, out entity)) | ||
389 | { | ||
390 | if (entity is SceneObjectGroup) | ||
391 | ((SceneObjectGroup)entity).Rotation = rotation; | ||
392 | else if (entity is ScenePresence) | ||
393 | ((ScenePresence)entity).Rotation = rotation; | ||
394 | } | ||
388 | } | 395 | } |
389 | else | 396 | else |
390 | { | 397 | { |