diff options
author | Dalien Talbot | 2007-09-09 17:32:03 +0000 |
---|---|---|
committer | Dalien Talbot | 2007-09-09 17:32:03 +0000 |
commit | 907918e68e9fb0deb0cea2fa9219ceb76dd41ae1 (patch) | |
tree | aaab4cb786b61992b76e5d238ab44b4d9f631267 /OpenSim/Region/Environment | |
parent | ODE: added support for Phantom flag. Presently you need to add 1024 to Objec... (diff) | |
download | opensim-SC-907918e68e9fb0deb0cea2fa9219ceb76dd41ae1.zip opensim-SC-907918e68e9fb0deb0cea2fa9219ceb76dd41ae1.tar.gz opensim-SC-907918e68e9fb0deb0cea2fa9219ceb76dd41ae1.tar.bz2 opensim-SC-907918e68e9fb0deb0cea2fa9219ceb76dd41ae1.tar.xz |
Little green men (aka dots on minimap). Thanks to bushing for
pointing out that it is done by CoarseLocationUpdatePacket.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index c96d575..8cf0b98 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -64,6 +64,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
64 | 64 | ||
65 | private bool newForce = false; | 65 | private bool newForce = false; |
66 | private bool newAvatar = false; | 66 | private bool newAvatar = false; |
67 | private bool newCoarseLocations = false; | ||
67 | 68 | ||
68 | protected RegionInfo m_regionInfo; | 69 | protected RegionInfo m_regionInfo; |
69 | protected ulong crossingFromRegion = 0; | 70 | protected ulong crossingFromRegion = 0; |
@@ -462,6 +463,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
462 | { | 463 | { |
463 | this.SendPrimUpdates(); | 464 | this.SendPrimUpdates(); |
464 | 465 | ||
466 | if (this.newCoarseLocations) { | ||
467 | this.SendCoarseLocations(); | ||
468 | this.newCoarseLocations = false; | ||
469 | } | ||
470 | |||
465 | if (this.childAgent == false) | 471 | if (this.childAgent == false) |
466 | { | 472 | { |
467 | if (this.newForce) | 473 | if (this.newForce) |
@@ -515,6 +521,37 @@ namespace OpenSim.Region.Environment.Scenes | |||
515 | } | 521 | } |
516 | } | 522 | } |
517 | 523 | ||
524 | |||
525 | public void SendCoarseLocations() | ||
526 | { | ||
527 | List<LLVector3> CoarseLocations = new List<LLVector3>(); | ||
528 | List<ScenePresence> avatars = this.m_scene.RequestAvatarList(); | ||
529 | for (int i = 0; i < avatars.Count; i++) | ||
530 | { | ||
531 | if (avatars[i] != this) { | ||
532 | CoarseLocations.Add(avatars[i].AbsolutePosition); | ||
533 | } | ||
534 | } | ||
535 | this.ControllingClient.SendCoarseLocationUpdate(CoarseLocations); | ||
536 | } | ||
537 | |||
538 | public void CoarseLocationChange(ScenePresence avatar) | ||
539 | { | ||
540 | newCoarseLocations = true; | ||
541 | } | ||
542 | |||
543 | private void NotifyMyCoarseLocationChange() | ||
544 | { | ||
545 | List<ScenePresence> avatars = this.m_scene.RequestAvatarList(); | ||
546 | for (int i = 0; i < avatars.Count; i++) { | ||
547 | if (avatars[i] != this) { | ||
548 | avatars[i].CoarseLocationChange(this); | ||
549 | } | ||
550 | } | ||
551 | |||
552 | } | ||
553 | |||
554 | |||
518 | /// <summary> | 555 | /// <summary> |
519 | /// | 556 | /// |
520 | /// </summary> | 557 | /// </summary> |
@@ -638,6 +675,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
638 | if (OnSignificantClientMovement != null) | 675 | if (OnSignificantClientMovement != null) |
639 | { | 676 | { |
640 | OnSignificantClientMovement(this.ControllingClient); | 677 | OnSignificantClientMovement(this.ControllingClient); |
678 | NotifyMyCoarseLocationChange(); | ||
641 | } | 679 | } |
642 | } | 680 | } |
643 | } | 681 | } |