Little green men (aka dots on minimap). Thanks to bushing for

pointing out that it is done by CoarseLocationUpdatePacket.
This commit is contained in:
Dalien Talbot
2007-09-09 17:32:03 +00:00
parent 94b03aa09d
commit 907918e68e
5 changed files with 62 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ namespace OpenSim.Region.Environment.Scenes
private bool newForce = false;
private bool newAvatar = false;
private bool newCoarseLocations = false;
protected RegionInfo m_regionInfo;
protected ulong crossingFromRegion = 0;
@@ -462,6 +463,11 @@ namespace OpenSim.Region.Environment.Scenes
{
this.SendPrimUpdates();
if (this.newCoarseLocations) {
this.SendCoarseLocations();
this.newCoarseLocations = false;
}
if (this.childAgent == false)
{
if (this.newForce)
@@ -515,6 +521,37 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void SendCoarseLocations()
{
List<LLVector3> CoarseLocations = new List<LLVector3>();
List<ScenePresence> avatars = this.m_scene.RequestAvatarList();
for (int i = 0; i < avatars.Count; i++)
{
if (avatars[i] != this) {
CoarseLocations.Add(avatars[i].AbsolutePosition);
}
}
this.ControllingClient.SendCoarseLocationUpdate(CoarseLocations);
}
public void CoarseLocationChange(ScenePresence avatar)
{
newCoarseLocations = true;
}
private void NotifyMyCoarseLocationChange()
{
List<ScenePresence> avatars = this.m_scene.RequestAvatarList();
for (int i = 0; i < avatars.Count; i++) {
if (avatars[i] != this) {
avatars[i].CoarseLocationChange(this);
}
}
}
/// <summary>
///
/// </summary>
@@ -638,6 +675,7 @@ namespace OpenSim.Region.Environment.Scenes
if (OnSignificantClientMovement != null)
{
OnSignificantClientMovement(this.ControllingClient);
NotifyMyCoarseLocationChange();
}
}
}