aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
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/Region/Environment/Scenes
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/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs30
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs9
2 files changed, 38 insertions, 1 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