aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/OpenSimClient.cs
diff options
context:
space:
mode:
authorMW2007-03-07 22:25:13 +0000
committerMW2007-03-07 22:25:13 +0000
commit778e302133283e3c4ea9c26431b46b3abe23dc1a (patch)
tree53f0bcec8bb9eccc587187326fa8ceac8ddffd12 /src/OpenSimClient.cs
parentHopefully fixed the Session logout bug. (diff)
downloadopensim-SC_OLD-778e302133283e3c4ea9c26431b46b3abe23dc1a.zip
opensim-SC_OLD-778e302133283e3c4ea9c26431b46b3abe23dc1a.tar.gz
opensim-SC_OLD-778e302133283e3c4ea9c26431b46b3abe23dc1a.tar.bz2
opensim-SC_OLD-778e302133283e3c4ea9c26431b46b3abe23dc1a.tar.xz
Primitives movement and rotation updates are now sent to all clients
Diffstat (limited to 'src/OpenSimClient.cs')
-rw-r--r--src/OpenSimClient.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs
index 5f68806..9544e7b 100644
--- a/src/OpenSimClient.cs
+++ b/src/OpenSimClient.cs
@@ -35,6 +35,7 @@ using System.IO;
35using System.Threading; 35using System.Threading;
36using System.Timers; 36using System.Timers;
37using OpenSim.GridServers; 37using OpenSim.GridServers;
38using OpenSim.world;
38 39
39namespace OpenSim 40namespace OpenSim
40{ 41{
@@ -102,6 +103,39 @@ namespace OpenSim
102 case PacketType.ObjectAdd: 103 case PacketType.ObjectAdd:
103 OpenSim_Main.local_world.AddNewPrim((ObjectAddPacket)Pack, this); 104 OpenSim_Main.local_world.AddNewPrim((ObjectAddPacket)Pack, this);
104 break; 105 break;
106 case PacketType.MultipleObjectUpdate :
107 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)Pack;
108
109 for( int i = 0; i < multipleupdate.ObjectData.Length; i++ )
110 {
111 if( multipleupdate.ObjectData[ i ].Type == 9 ) //change position
112 {
113 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[ i ].Data, 0 );
114 foreach (Entity ent in OpenSim_Main.local_world.Entities.Values)
115 {
116 if(ent.localid == multipleupdate.ObjectData[ i ].ObjectLocalID)
117 {
118 ent.position = pos;
119 ((OpenSim.world.Primitive)ent).UpdateFlag = true;
120 }
121 }
122
123 //should update stored position of the prim
124 }
125 else if(multipleupdate.ObjectData[i].Type == 10 )//rotation
126 {
127 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
128 foreach (Entity ent in OpenSim_Main.local_world.Entities.Values)
129 {
130 if(ent.localid == multipleupdate.ObjectData[ i ].ObjectLocalID)
131 {
132 ent.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.W);
133 ((OpenSim.world.Primitive)ent).UpdateFlag = true;
134 }
135 }
136 }
137 }
138 break;
105 case PacketType.TransferRequest: 139 case PacketType.TransferRequest:
106 //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); 140 //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request");
107 TransferRequestPacket transfer = (TransferRequestPacket)Pack; 141 TransferRequestPacket transfer = (TransferRequestPacket)Pack;