From 2f2ec10172a5a68caa909cc153ebcf7a14192892 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 11 Jun 2007 16:13:52 +0000
Subject: A few small changes and hopefully fixed the nant build problem
(OpenSim.Framework came before OpenSim.Framework.Console, so was causing a
problem as OpenSim.Framework references OpenSim.Framework.Console).
---
OpenSim/OpenSim.Region/World/Primitive.cs | 2 +-
OpenSim/OpenSim.Region/World/World.cs | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
(limited to 'OpenSim/OpenSim.Region')
diff --git a/OpenSim/OpenSim.Region/World/Primitive.cs b/OpenSim/OpenSim.Region/World/Primitive.cs
index 99e349d..d7c1e8d 100644
--- a/OpenSim/OpenSim.Region/World/Primitive.cs
+++ b/OpenSim/OpenSim.Region/World/Primitive.cs
@@ -440,7 +440,7 @@ namespace OpenSim.Region
PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
LLVector3 pos1 = addPacket.ObjectData.RayEnd;
this.primData.FullID = this.uuid = LLUUID.Random();
- this.localid = (uint)(localID);
+ this.primData.LocalID = this.localid = (uint)(localID);
this.primData.Position = this.Pos = pos1;
this.updateFlag = 1;
diff --git a/OpenSim/OpenSim.Region/World/World.cs b/OpenSim/OpenSim.Region/World/World.cs
index e316e27..3415f08 100644
--- a/OpenSim/OpenSim.Region/World/World.cs
+++ b/OpenSim/OpenSim.Region/World/World.cs
@@ -20,6 +20,8 @@ using OpenSim.Region.Estate;
namespace OpenSim.Region
{
+ public delegate bool FilterAvatarList(Avatar avatar);
+
public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
{
protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
@@ -592,6 +594,25 @@ namespace OpenSim.Region
return result;
}
+ ///
+ /// Request a filtered list of Avatars in this World
+ ///
+ ///
+ public List RequestAvatarList(FilterAvatarList filter)
+ {
+ List result = new List();
+
+ foreach (Avatar avatar in Avatars.Values)
+ {
+ if (filter(avatar))
+ {
+ result.Add(avatar);
+ }
+ }
+
+ return result;
+ }
+
public Avatar RequestAvatar(LLUUID avatarID)
{
if (this.Avatars.ContainsKey(avatarID))
--
cgit v1.1