diff options
Diffstat (limited to 'OpenSim/OpenSim.Region')
-rw-r--r-- | OpenSim/OpenSim.Region/World/Primitive.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/World/World.cs | 21 |
2 files changed, 22 insertions, 1 deletions
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 | |||
440 | PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | 440 | PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; |
441 | LLVector3 pos1 = addPacket.ObjectData.RayEnd; | 441 | LLVector3 pos1 = addPacket.ObjectData.RayEnd; |
442 | this.primData.FullID = this.uuid = LLUUID.Random(); | 442 | this.primData.FullID = this.uuid = LLUUID.Random(); |
443 | this.localid = (uint)(localID); | 443 | this.primData.LocalID = this.localid = (uint)(localID); |
444 | this.primData.Position = this.Pos = pos1; | 444 | this.primData.Position = this.Pos = pos1; |
445 | 445 | ||
446 | this.updateFlag = 1; | 446 | 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; | |||
20 | 20 | ||
21 | namespace OpenSim.Region | 21 | namespace OpenSim.Region |
22 | { | 22 | { |
23 | public delegate bool FilterAvatarList(Avatar avatar); | ||
24 | |||
23 | public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI | 25 | public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI |
24 | { | 26 | { |
25 | protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); | 27 | protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); |
@@ -592,6 +594,25 @@ namespace OpenSim.Region | |||
592 | return result; | 594 | return result; |
593 | } | 595 | } |
594 | 596 | ||
597 | /// <summary> | ||
598 | /// Request a filtered list of Avatars in this World | ||
599 | /// </summary> | ||
600 | /// <returns></returns> | ||
601 | public List<Avatar> RequestAvatarList(FilterAvatarList filter) | ||
602 | { | ||
603 | List<Avatar> result = new List<Avatar>(); | ||
604 | |||
605 | foreach (Avatar avatar in Avatars.Values) | ||
606 | { | ||
607 | if (filter(avatar)) | ||
608 | { | ||
609 | result.Add(avatar); | ||
610 | } | ||
611 | } | ||
612 | |||
613 | return result; | ||
614 | } | ||
615 | |||
595 | public Avatar RequestAvatar(LLUUID avatarID) | 616 | public Avatar RequestAvatar(LLUUID avatarID) |
596 | { | 617 | { |
597 | if (this.Avatars.ContainsKey(avatarID)) | 618 | if (this.Avatars.ContainsKey(avatarID)) |