aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityBase.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
4 files changed, 23 insertions, 16 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/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6c0d9f2..b12eea9 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 {