diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 152 |
2 files changed, 55 insertions, 110 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index eb1e4b5..8101ca2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | |||
@@ -150,7 +150,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
150 | string skillsText = String.Empty; | 150 | string skillsText = String.Empty; |
151 | string languages = String.Empty; | 151 | string languages = String.Empty; |
152 | 152 | ||
153 | Byte[] charterMember = Utils.StringToBytes("Avatar"); | 153 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, avatarID); |
154 | |||
155 | string name = "Avatar"; | ||
156 | int created = 0; | ||
157 | if (account != null) | ||
158 | { | ||
159 | name = account.FirstName + " " + account.LastName; | ||
160 | created = account.Created; | ||
161 | } | ||
162 | Byte[] charterMember = Utils.StringToBytes(name); | ||
154 | 163 | ||
155 | profileUrl = "No profile data"; | 164 | profileUrl = "No profile data"; |
156 | aboutText = string.Empty; | 165 | aboutText = string.Empty; |
@@ -160,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
160 | partner = UUID.Zero; | 169 | partner = UUID.Zero; |
161 | 170 | ||
162 | remoteClient.SendAvatarProperties(avatarID, aboutText, | 171 | remoteClient.SendAvatarProperties(avatarID, aboutText, |
163 | Util.ToDateTime(0).ToString( | 172 | Util.ToDateTime(created).ToString( |
164 | "M/d/yyyy", CultureInfo.InvariantCulture), | 173 | "M/d/yyyy", CultureInfo.InvariantCulture), |
165 | charterMember, firstLifeAboutText, | 174 | charterMember, firstLifeAboutText, |
166 | (uint)(0 & 0xff), | 175 | (uint)(0 & 0xff), |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 40c8d06..e982bfe 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -341,15 +341,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
341 | /// <summary> | 341 | /// <summary> |
342 | /// Position of agent's camera in world (region cordinates) | 342 | /// Position of agent's camera in world (region cordinates) |
343 | /// </summary> | 343 | /// </summary> |
344 | protected Vector3 m_lastCameraPosition; | 344 | protected Vector3 m_lastCameraPosition; |
345 | 345 | ||
346 | protected Vector3 m_CameraPosition; | 346 | public Vector3 CameraPosition { get; set; } |
347 | |||
348 | public Vector3 CameraPosition | ||
349 | { | ||
350 | get { return m_CameraPosition; } | ||
351 | private set { m_CameraPosition = value; } | ||
352 | } | ||
353 | 347 | ||
354 | public Quaternion CameraRotation | 348 | public Quaternion CameraRotation |
355 | { | 349 | { |
@@ -358,29 +352,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
358 | 352 | ||
359 | // Use these three vectors to figure out what the agent is looking at | 353 | // Use these three vectors to figure out what the agent is looking at |
360 | // Convert it to a Matrix and/or Quaternion | 354 | // Convert it to a Matrix and/or Quaternion |
361 | // | 355 | // |
362 | protected Vector3 m_CameraAtAxis; | 356 | public Vector3 CameraAtAxis { get; set; } |
363 | protected Vector3 m_CameraLeftAxis; | 357 | public Vector3 CameraLeftAxis { get; set; } |
364 | protected Vector3 m_CameraUpAxis; | 358 | public Vector3 CameraUpAxis { get; set; } |
365 | |||
366 | public Vector3 CameraAtAxis | ||
367 | { | ||
368 | get { return m_CameraAtAxis; } | ||
369 | private set { m_CameraAtAxis = value; } | ||
370 | } | ||
371 | |||
372 | |||
373 | public Vector3 CameraLeftAxis | ||
374 | { | ||
375 | get { return m_CameraLeftAxis; } | ||
376 | private set { m_CameraLeftAxis = value; } | ||
377 | } | ||
378 | |||
379 | public Vector3 CameraUpAxis | ||
380 | { | ||
381 | get { return m_CameraUpAxis; } | ||
382 | private set { m_CameraUpAxis = value; } | ||
383 | } | ||
384 | 359 | ||
385 | public Vector3 Lookat | 360 | public Vector3 Lookat |
386 | { | 361 | { |
@@ -396,33 +371,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
396 | } | 371 | } |
397 | #endregion | 372 | #endregion |
398 | 373 | ||
399 | public readonly string Firstname; | 374 | public string Firstname { get; private set; } |
400 | public readonly string Lastname; | 375 | public string Lastname { get; private set; } |
401 | 376 | ||
402 | private string m_grouptitle; | 377 | public string Grouptitle { get; set; } |
403 | |||
404 | public string Grouptitle | ||
405 | { | ||
406 | get { return m_grouptitle; } | ||
407 | set { m_grouptitle = value; } | ||
408 | } | ||
409 | |||
410 | // Agent's Draw distance. | ||
411 | protected float m_DrawDistance; | ||
412 | |||
413 | public float DrawDistance | ||
414 | { | ||
415 | get { return m_DrawDistance; } | ||
416 | private set { m_DrawDistance = value; } | ||
417 | } | ||
418 | |||
419 | protected bool m_allowMovement = true; | ||
420 | 378 | ||
421 | public bool AllowMovement | 379 | // Agent's Draw distance. |
422 | { | 380 | public float DrawDistance { get; set; } |
423 | get { return m_allowMovement; } | 381 | |
424 | set { m_allowMovement = value; } | 382 | public bool AllowMovement { get; set; } |
425 | } | ||
426 | 383 | ||
427 | private bool m_setAlwaysRun; | 384 | private bool m_setAlwaysRun; |
428 | 385 | ||
@@ -447,15 +404,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
447 | PhysicsActor.SetAlwaysRun = value; | 404 | PhysicsActor.SetAlwaysRun = value; |
448 | } | 405 | } |
449 | } | 406 | } |
450 | } | 407 | } |
451 | 408 | ||
452 | private byte m_state; | 409 | public byte State { get; set; } |
453 | |||
454 | public byte State | ||
455 | { | ||
456 | get { return m_state; } | ||
457 | set { m_state = value; } | ||
458 | } | ||
459 | 410 | ||
460 | private AgentManager.ControlFlags m_AgentControlFlags; | 411 | private AgentManager.ControlFlags m_AgentControlFlags; |
461 | 412 | ||
@@ -463,31 +414,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
463 | { | 414 | { |
464 | get { return (uint)m_AgentControlFlags; } | 415 | get { return (uint)m_AgentControlFlags; } |
465 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } | 416 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } |
466 | } | 417 | } |
467 | 418 | ||
468 | /// <summary> | 419 | public IClientAPI ControllingClient { get; set; } |
469 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | ||
470 | /// </summary> | ||
471 | private IClientAPI m_controllingClient; | ||
472 | |||
473 | public IClientAPI ControllingClient | ||
474 | { | ||
475 | get { return m_controllingClient; } | ||
476 | private set { m_controllingClient = value; } | ||
477 | } | ||
478 | 420 | ||
479 | public IClientCore ClientView | 421 | public IClientCore ClientView |
480 | { | 422 | { |
481 | get { return (IClientCore) m_controllingClient; } | 423 | get { return (IClientCore)ControllingClient; } |
482 | } | 424 | } |
483 | 425 | ||
484 | protected Vector3 m_parentPosition; | 426 | public Vector3 ParentPosition { get; set; } |
485 | |||
486 | public Vector3 ParentPosition | ||
487 | { | ||
488 | get { return m_parentPosition; } | ||
489 | set { m_parentPosition = value; } | ||
490 | } | ||
491 | 427 | ||
492 | /// <summary> | 428 | /// <summary> |
493 | /// Position of this avatar relative to the region the avatar is in | 429 | /// Position of this avatar relative to the region the avatar is in |
@@ -825,18 +761,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
825 | 761 | ||
826 | private Vector3[] GetWalkDirectionVectors() | 762 | private Vector3[] GetWalkDirectionVectors() |
827 | { | 763 | { |
828 | Vector3[] vector = new Vector3[11]; | 764 | Vector3[] vector = new Vector3[11]; |
829 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 765 | vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD |
830 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 766 | vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK |
831 | vector[2] = Vector3.UnitY; //LEFT | 767 | vector[2] = Vector3.UnitY; //LEFT |
832 | vector[3] = -Vector3.UnitY; //RIGHT | 768 | vector[3] = -Vector3.UnitY; //RIGHT |
833 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP | 769 | vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP |
834 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 770 | vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN |
835 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 771 | vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE |
836 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 772 | vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE |
837 | vector[8] = Vector3.UnitY; //LEFT_NUDGE | 773 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
838 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | 774 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE |
839 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | 775 | vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE |
840 | return vector; | 776 | return vector; |
841 | } | 777 | } |
842 | 778 | ||
@@ -1333,7 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1333 | // Convert it to a Matrix and/or Quaternion | 1269 | // Convert it to a Matrix and/or Quaternion |
1334 | CameraAtAxis = agentData.CameraAtAxis; | 1270 | CameraAtAxis = agentData.CameraAtAxis; |
1335 | CameraLeftAxis = agentData.CameraLeftAxis; | 1271 | CameraLeftAxis = agentData.CameraLeftAxis; |
1336 | m_CameraUpAxis = agentData.CameraUpAxis; | 1272 | CameraUpAxis = agentData.CameraUpAxis; |
1337 | 1273 | ||
1338 | // The Agent's Draw distance setting | 1274 | // The Agent's Draw distance setting |
1339 | // When we get to the point of re-computing neighbors everytime this | 1275 | // When we get to the point of re-computing neighbors everytime this |
@@ -1343,9 +1279,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1343 | DrawDistance = Scene.DefaultDrawDistance; | 1279 | DrawDistance = Scene.DefaultDrawDistance; |
1344 | 1280 | ||
1345 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1281 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1346 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | 1282 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); |
1347 | 1283 | ||
1348 | m_followCamAuto = ((m_CameraUpAxis.Z > 0.959f && m_CameraUpAxis.Z < 0.98f) | 1284 | m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) |
1349 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; | 1285 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; |
1350 | 1286 | ||
1351 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 1287 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
@@ -3077,8 +3013,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3077 | cAgent.Velocity = m_velocity; | 3013 | cAgent.Velocity = m_velocity; |
3078 | cAgent.Center = CameraPosition; | 3014 | cAgent.Center = CameraPosition; |
3079 | cAgent.AtAxis = CameraAtAxis; | 3015 | cAgent.AtAxis = CameraAtAxis; |
3080 | cAgent.LeftAxis = CameraLeftAxis; | 3016 | cAgent.LeftAxis = CameraLeftAxis; |
3081 | cAgent.UpAxis = m_CameraUpAxis; | 3017 | cAgent.UpAxis = CameraUpAxis; |
3082 | 3018 | ||
3083 | cAgent.Far = DrawDistance; | 3019 | cAgent.Far = DrawDistance; |
3084 | 3020 | ||
@@ -3163,8 +3099,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3163 | m_velocity = cAgent.Velocity; | 3099 | m_velocity = cAgent.Velocity; |
3164 | CameraPosition = cAgent.Center; | 3100 | CameraPosition = cAgent.Center; |
3165 | CameraAtAxis = cAgent.AtAxis; | 3101 | CameraAtAxis = cAgent.AtAxis; |
3166 | CameraLeftAxis = cAgent.LeftAxis; | 3102 | CameraLeftAxis = cAgent.LeftAxis; |
3167 | m_CameraUpAxis = cAgent.UpAxis; | 3103 | CameraUpAxis = cAgent.UpAxis; |
3168 | 3104 | ||
3169 | // When we get to the point of re-computing neighbors everytime this | 3105 | // When we get to the point of re-computing neighbors everytime this |
3170 | // changes, then start using the agent's drawdistance rather than the | 3106 | // changes, then start using the agent's drawdistance rather than the |