aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim.build2
-rw-r--r--OpenSim/OpenSim.Region/World/Primitive.cs2
-rw-r--r--OpenSim/OpenSim.Region/World/World.cs21
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs40
-rw-r--r--prebuild.xml19
6 files changed, 68 insertions, 17 deletions
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index 8a9b598..b26a089 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -103,6 +103,7 @@ namespace OpenSim.Framework.Interfaces
103 AgentCircuitData RequestClientInfo(); 103 AgentCircuitData RequestClientInfo();
104 104
105 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 105 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
106 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID);
106 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID); 107 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID);
107 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); 108 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
108 } 109 }
diff --git a/OpenSim.build b/OpenSim.build
index 9134ac3..6a0a8db 100644
--- a/OpenSim.build
+++ b/OpenSim.build
@@ -70,8 +70,8 @@
70 70
71 <target name="build" depends="init" description=""> 71 <target name="build" depends="init" description="">
72 <nant buildfile="Common/XmlRpcCS/XMLRPC.dll.build" target="build" /> 72 <nant buildfile="Common/XmlRpcCS/XMLRPC.dll.build" target="build" />
73 <nant buildfile="Common/OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
74 <nant buildfile="Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" /> 73 <nant buildfile="Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" />
74 <nant buildfile="Common/OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
75 <nant buildfile="Common/OpenSim.Servers/OpenSim.Servers.dll.build" target="build" /> 75 <nant buildfile="Common/OpenSim.Servers/OpenSim.Servers.dll.build" target="build" />
76 <nant buildfile="Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build" target="build" /> 76 <nant buildfile="Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build" target="build" />
77 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="build" /> 77 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="build" />
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
21namespace OpenSim.Region 21namespace 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))
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index 780035c..f7d98bb 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -448,6 +448,34 @@ namespace OpenSim
448 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive 448 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
449 /// or big changes to a existing primitive. 449 /// or big changes to a existing primitive.
450 /// </summary> 450 /// </summary>
451 /// <param name="regionHandle"></param>
452 /// <param name="timeDilation"></param>
453 /// <param name="localID"></param>
454 /// <param name="primData"></param>
455 /// <param name="pos"></param>
456 /// <param name="rotation"></param>
457 /// <param name="textureID"></param>
458 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID)
459 {
460 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
461 outPacket.RegionData.RegionHandle = regionHandle;
462 outPacket.RegionData.TimeDilation = timeDilation;
463 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
464 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID);
465 outPacket.ObjectData[0].ID = localID;
466 outPacket.ObjectData[0].FullID = primData.FullID;
467 byte[] pb = pos.GetBytes();
468 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
469 byte[] rot = rotation.GetBytes();
470 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length);
471 OutPacket(outPacket);
472 }
473
474 /// <summary>
475 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
476 /// or big changes to a existing primitive.
477 /// uses default rotation
478 /// </summary>
451 /// <param name="primData"></param> 479 /// <param name="primData"></param>
452 /// <param name="pos"></param> 480 /// <param name="pos"></param>
453 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID) 481 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID)
@@ -473,9 +501,9 @@ namespace OpenSim
473 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID) 501 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID)
474 { 502 {
475 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); 503 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
476 this.SetDefaultPrimPacketValues(objupdate, textureID); 504 this.SetDefaultPrimPacketValues(objupdate);
477 objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456; 505 objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
478 this.SetPrimPacketShapeData(objupdate, primData); 506 this.SetPrimPacketShapeData(objupdate, primData, textureID);
479 507
480 return objupdate; 508 return objupdate;
481 } 509 }
@@ -484,7 +512,7 @@ namespace OpenSim
484 /// Set some default values in a ObjectUpdatePacket 512 /// Set some default values in a ObjectUpdatePacket
485 /// </summary> 513 /// </summary>
486 /// <param name="objdata"></param> 514 /// <param name="objdata"></param>
487 protected void SetDefaultPrimPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata, LLUUID textureID) 515 protected void SetDefaultPrimPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
488 { 516 {
489 objdata.PSBlock = new byte[0]; 517 objdata.PSBlock = new byte[0];
490 objdata.ExtraParams = new byte[1]; 518 objdata.ExtraParams = new byte[1];
@@ -497,8 +525,6 @@ namespace OpenSim
497 objdata.Material = 3; 525 objdata.Material = 3;
498 objdata.TextureAnim = new byte[0]; 526 objdata.TextureAnim = new byte[0];
499 objdata.Sound = LLUUID.Zero; 527 objdata.Sound = LLUUID.Zero;
500 LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID);
501 objdata.TextureEntry = ntex.ToBytes();
502 objdata.State = 0; 528 objdata.State = 0;
503 objdata.Data = new byte[0]; 529 objdata.Data = new byte[0];
504 530
@@ -512,8 +538,10 @@ namespace OpenSim
512 /// </summary> 538 /// </summary>
513 /// <param name="objectData"></param> 539 /// <param name="objectData"></param>
514 /// <param name="primData"></param> 540 /// <param name="primData"></param>
515 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimData primData) 541 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimData primData, LLUUID textureID)
516 { 542 {
543 LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID);
544 objectData.TextureEntry = ntex.ToBytes();
517 objectData.OwnerID = primData.OwnerID; 545 objectData.OwnerID = primData.OwnerID;
518 objectData.PCode = primData.PCode; 546 objectData.PCode = primData.PCode;
519 objectData.PathBegin =primData.PathBegin; 547 objectData.PathBegin =primData.PathBegin;
diff --git a/prebuild.xml b/prebuild.xml
index b878263..2aa8a37 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -56,7 +56,7 @@
56 56
57 <!-- Core OpenSim Projects --> 57 <!-- Core OpenSim Projects -->
58 58
59 <Project name="OpenSim.Framework" path="Common/OpenSim.Framework" type="Library"> 59 <Project name="OpenSim.Framework.Console" path="Common/OpenSim.Framework.Console" type="Library">
60 <Configuration name="Debug"> 60 <Configuration name="Debug">
61 <Options> 61 <Options>
62 <OutputPath>../../bin/</OutputPath> 62 <OutputPath>../../bin/</OutputPath>
@@ -69,18 +69,13 @@
69 </Configuration> 69 </Configuration>
70 70
71 <ReferencePath>../../bin/</ReferencePath> 71 <ReferencePath>../../bin/</ReferencePath>
72 <Reference name="System"/> 72 <Reference name="System" localCopy="false"/>
73 <Reference name="System.Xml"/>
74 <Reference name="libsecondlife.dll"/>
75 <Reference name="Db4objects.Db4o.dll"/>
76 <Reference name="XMLRPC"/>
77 <Reference name="OpenSim.Framework.Console"/>
78 <Files> 73 <Files>
79 <Match pattern="*.cs" recurse="true"/> 74 <Match pattern="*.cs" recurse="true"/>
80 </Files> 75 </Files>
81 </Project> 76 </Project>
82 77
83 <Project name="OpenSim.Framework.Console" path="Common/OpenSim.Framework.Console" type="Library"> 78 <Project name="OpenSim.Framework" path="Common/OpenSim.Framework" type="Library">
84 <Configuration name="Debug"> 79 <Configuration name="Debug">
85 <Options> 80 <Options>
86 <OutputPath>../../bin/</OutputPath> 81 <OutputPath>../../bin/</OutputPath>
@@ -93,12 +88,18 @@
93 </Configuration> 88 </Configuration>
94 89
95 <ReferencePath>../../bin/</ReferencePath> 90 <ReferencePath>../../bin/</ReferencePath>
96 <Reference name="System" localCopy="false"/> 91 <Reference name="System"/>
92 <Reference name="System.Xml"/>
93 <Reference name="libsecondlife.dll"/>
94 <Reference name="Db4objects.Db4o.dll"/>
95 <Reference name="XMLRPC"/>
96 <Reference name="OpenSim.Framework.Console"/>
97 <Files> 97 <Files>
98 <Match pattern="*.cs" recurse="true"/> 98 <Match pattern="*.cs" recurse="true"/>
99 </Files> 99 </Files>
100 </Project> 100 </Project>
101 101
102
102 <Project name="OpenSim.Servers" path="Common/OpenSim.Servers" type="Library"> 103 <Project name="OpenSim.Servers" path="Common/OpenSim.Servers" type="Library">
103 <Configuration name="Debug"> 104 <Configuration name="Debug">
104 <Options> 105 <Options>