aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-08-01 02:33:28 +0000
committerCharles Krinke2008-08-01 02:33:28 +0000
commitab778c4114d694e284ac711b7500e9ced7d01bad (patch)
tree2e458da86aba97bc2d37e957e2edcf5e8ad81b8c /OpenSim
parentPatch #8 in the estate series. Introduces the concept of an estate (diff)
downloadopensim-SC-ab778c4114d694e284ac711b7500e9ced7d01bad.zip
opensim-SC-ab778c4114d694e284ac711b7500e9ced7d01bad.tar.gz
opensim-SC-ab778c4114d694e284ac711b7500e9ced7d01bad.tar.bz2
opensim-SC-ab778c4114d694e284ac711b7500e9ced7d01bad.tar.xz
Mantis#1859. Thank you kindly, Lmmz for a patch that:
Implements llForceMouselook().
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs30
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
4 files changed, 44 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 1d719b2..675322a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -195,6 +195,12 @@ namespace OpenSim.Region.Environment.Scenes
195 protected LLUUID m_uuid; 195 protected LLUUID m_uuid;
196 protected LLVector3 m_velocity; 196 protected LLVector3 m_velocity;
197 197
198 // TODO: Those have to be changed into persistent properties at some later point,
199 // or sit-camera on vehicles will break on sim-crossing.
200 private LLVector3 m_cameraEyeOffset = new LLVector3(0.0f, 0.0f, 0.0f);
201 private LLVector3 m_cameraAtOffset = new LLVector3(0.0f, 0.0f, 0.0f);
202 private bool m_forceMouselook = false;
203
198 #endregion Fields 204 #endregion Fields
199 205
200 #region Constructors 206 #region Constructors
@@ -3313,6 +3319,30 @@ namespace OpenSim.Region.Environment.Scenes
3313 } 3319 }
3314 } 3320 }
3315 3321
3322 public void SetCameraAtOffset(LLVector3 v) {
3323 m_cameraAtOffset = v;
3324 }
3325
3326 public void SetCameraEyeOffset(LLVector3 v) {
3327 m_cameraEyeOffset = v;
3328 }
3329
3330 public void SetForceMouselook(bool force) {
3331 m_forceMouselook = force;
3332 }
3333
3334 public LLVector3 GetCameraAtOffset() {
3335 return m_cameraAtOffset;
3336 }
3337
3338 public LLVector3 GetCameraEyeOffset() {
3339 return m_cameraEyeOffset;
3340 }
3341
3342 public bool GetForceMouselook() {
3343 return m_forceMouselook;
3344 }
3345
3316 #endregion Public Methods 3346 #endregion Public Methods
3317 } 3347 }
3318} 3348}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index b24ee8a..221da0e 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1129,6 +1129,9 @@ namespace OpenSim.Region.Environment.Scenes
1129 bool autopilot = true; 1129 bool autopilot = true;
1130 LLVector3 pos = new LLVector3(); 1130 LLVector3 pos = new LLVector3();
1131 LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); 1131 LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1);
1132 LLVector3 cameraEyeOffset = LLVector3.Zero;
1133 LLVector3 cameraAtOffset = LLVector3.Zero;
1134 bool forceMouselook = false;
1132 1135
1133 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); 1136 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID);
1134 SceneObjectPart part = FindNextAvailableSitTarget(targetID); 1137 SceneObjectPart part = FindNextAvailableSitTarget(targetID);
@@ -1183,9 +1186,13 @@ namespace OpenSim.Region.Environment.Scenes
1183 RemoveFromPhysicalScene(); 1186 RemoveFromPhysicalScene();
1184 } 1187 }
1185 } 1188 }
1189
1190 cameraAtOffset = part.GetCameraAtOffset();
1191 cameraEyeOffset = part.GetCameraEyeOffset();
1192 forceMouselook = part.GetForceMouselook();
1186 } 1193 }
1187 1194
1188 ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false); 1195 ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook);
1189 m_requestedSitTargetUUID = targetID; 1196 m_requestedSitTargetUUID = targetID;
1190 // This calls HandleAgentSit twice, once from here, and the client calls 1197 // This calls HandleAgentSit twice, once from here, and the client calls
1191 // HandleAgentSit itself after it gets to the location 1198 // HandleAgentSit itself after it gets to the location
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 422ff71..30093eb 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4747,13 +4747,13 @@ namespace OpenSim.Region.ScriptEngine.Common
4747 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 4747 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
4748 { 4748 {
4749 m_host.AddScriptLPS(1); 4749 m_host.AddScriptLPS(1);
4750 NotImplemented("llSetCameraEyeOffset"); 4750 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z));
4751 } 4751 }
4752 4752
4753 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 4753 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
4754 { 4754 {
4755 m_host.AddScriptLPS(1); 4755 m_host.AddScriptLPS(1);
4756 NotImplemented("llSetCameraAtOffset"); 4756 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z));
4757 } 4757 }
4758 4758
4759 public string llDumpList2String(LSL_Types.list src, string seperator) 4759 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -6627,7 +6627,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6627 public void llForceMouselook(int mouselook) 6627 public void llForceMouselook(int mouselook)
6628 { 6628 {
6629 m_host.AddScriptLPS(1); 6629 m_host.AddScriptLPS(1);
6630 NotImplemented("llForceMouselook"); 6630 m_host.SetForceMouselook(mouselook != 0);
6631 } 6631 }
6632 6632
6633 public double llGetObjectMass(string id) 6633 public double llGetObjectMass(string id)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e5c6ac1..401a5ea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4609,13 +4609,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4609 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 4609 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
4610 { 4610 {
4611 m_host.AddScriptLPS(1); 4611 m_host.AddScriptLPS(1);
4612 NotImplemented("llSetCameraEyeOffset"); 4612 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z));
4613 } 4613 }
4614 4614
4615 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 4615 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
4616 { 4616 {
4617 m_host.AddScriptLPS(1); 4617 m_host.AddScriptLPS(1);
4618 NotImplemented("llSetCameraAtOffset"); 4618 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z));
4619 } 4619 }
4620 4620
4621 public string llDumpList2String(LSL_Types.list src, string seperator) 4621 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -6410,7 +6410,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6410 public void llForceMouselook(int mouselook) 6410 public void llForceMouselook(int mouselook)
6411 { 6411 {
6412 m_host.AddScriptLPS(1); 6412 m_host.AddScriptLPS(1);
6413 NotImplemented("llForceMouselook"); 6413 m_host.SetForceMouselook(mouselook != 0);
6414 } 6414 }
6415 6415
6416 public double llGetObjectMass(string id) 6416 public double llGetObjectMass(string id)