aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/world
diff options
context:
space:
mode:
authorMW2007-05-26 14:34:57 +0000
committerMW2007-05-26 14:34:57 +0000
commitc3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8 (patch)
treec5de8198621ecacf0798ff84aa00208c6f51a78f /OpenSim/OpenSim.RegionServer/world
parentDie Avatar class, and you to Primitive class! (diff)
downloadopensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.zip
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.gz
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.bz2
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.xz
Die WebFrontEnd, Die Grid class!
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.cs21
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs109
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs1
3 files changed, 5 insertions, 126 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
index a95b65d..cca266b 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
@@ -90,21 +90,7 @@ namespace OpenSim.world
90 90
91 public void ChildStatusChange(bool status) 91 public void ChildStatusChange(bool status)
92 { 92 {
93 Console.WriteLine("child agent status change"); 93
94 this.childAvatar = status;
95
96 if (this.childAvatar == true)
97 {
98 this.StopMovement();
99 }
100 else
101 {
102 LLVector3 startp = ControllingClient.StartPos;
103 lock (m_world.LockPhysicsEngine)
104 {
105 this._physActor.Position = new PhysicsVector(startp.X, startp.Y, startp.Z);
106 }
107 }
108 } 94 }
109 95
110 public override void addForces() 96 public override void addForces()
@@ -147,13 +133,12 @@ namespace OpenSim.world
147 133
148 public static void LoadAnims() 134 public static void LoadAnims()
149 { 135 {
150 Avatar.Animations = new AvatarAnimations(); 136
151 Avatar.Animations.LoadAnims();
152 } 137 }
153 138
154 public override void LandRenegerated() 139 public override void LandRenegerated()
155 { 140 {
156 Pos = new LLVector3(100.0f, 100.0f, m_world.Terrain[(int)Pos.X, (int)Pos.Y] + 50.0f); 141
157 } 142 }
158 } 143 }
159 144
diff --git a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
index 4f32335..ee5a23a 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
@@ -87,42 +87,7 @@ namespace OpenSim.world
87 if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero) 87 if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero)
88 { 88 {
89 //currently following code not used (or don't know of any case of destination being zero 89 //currently following code not used (or don't know of any case of destination being zero
90 libsecondlife.LLUUID[] DeRezEnts; 90
91 DeRezEnts = new libsecondlife.LLUUID[DeRezPacket.ObjectData.Length];
92 int i = 0;
93 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
94 {
95
96 //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString());
97 foreach (Entity ent in this.Entities.Values)
98 {
99 if (ent.localid == Data.ObjectLocalID)
100 {
101 DeRezEnts[i++] = ent.uuid;
102 this.localStorage.RemovePrim(ent.uuid);
103 KillObjectPacket kill = new KillObjectPacket();
104 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
105 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
106 kill.ObjectData[0].ID = ent.localid;
107 foreach (ClientView client in m_clientThreads.Values)
108 {
109 client.OutPacket(kill);
110 }
111 //Uncommenting this means an old UUID will be re-used, thus crashing the asset server
112 //Uncomment when prim/object UUIDs are random or such
113 //2007-03-22 - Randomskk
114 //this._primCount--;
115 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Deleted UUID " + ent.uuid);
116 }
117 }
118 }
119 foreach (libsecondlife.LLUUID uuid in DeRezEnts)
120 {
121 lock (Entities)
122 {
123 Entities.Remove(uuid);
124 }
125 }
126 } 91 }
127 else 92 else
128 { 93 {
@@ -292,77 +257,5 @@ namespace OpenSim.world
292 } 257 }
293 } 258 }
294 } 259 }
295
296 /*
297 public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY)
298 {
299 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
300 if (((m_regInfo.RegionLocX > minX) && (m_regInfo.RegionLocX < maxX)) && ((m_regInfo.RegionLocY > minY) && (m_regInfo.RegionLocY < maxY)))
301 {
302 MapBlockReplyPacket mapReply = new MapBlockReplyPacket();
303 mapReply.AgentData.AgentID = simClient.AgentID;
304 mapReply.AgentData.Flags = 0;
305 mapReply.Data = new MapBlockReplyPacket.DataBlock[1];
306 mapReply.Data[0] = new MapBlockReplyPacket.DataBlock();
307 mapReply.Data[0].MapImageID = new LLUUID("00000000-0000-0000-9999-000000000007");
308 mapReply.Data[0].X = (ushort)m_regInfo.RegionLocX;
309 mapReply.Data[0].Y = (ushort)m_regInfo.RegionLocY;
310 mapReply.Data[0].WaterHeight = (byte)m_regInfo.RegionWaterHeight;
311 mapReply.Data[0].Name = _enc.GetBytes(this.m_regionName);
312 mapReply.Data[0].RegionFlags = 72458694;
313 mapReply.Data[0].Access = 13;
314 mapReply.Data[0].Agents = 1; //should send number of clients connected
315 simClient.OutPacket(mapReply);
316 }
317 }
318 public bool RezObjectHandler(ClientView simClient, Packet packet)
319 {
320 RezObjectPacket rezPacket = (RezObjectPacket)packet;
321 AgentInventory inven = this._inventoryCache.GetAgentsInventory(simClient.AgentID);
322 if (inven != null)
323 {
324 if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID))
325 {
326 AssetBase asset = this._assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID);
327 if (asset != null)
328 {
329 PrimData primd = new PrimData(asset.Data);
330 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
331 nPrim.CreateFromStorage(primd, rezPacket.RezData.RayEnd, this._primCount, true);
332 this.Entities.Add(nPrim.uuid, nPrim);
333 this._primCount++;
334 this._inventoryCache.DeleteInventoryItem(simClient, rezPacket.InventoryData.ItemID);
335 }
336 }
337 }
338 return true;
339 }
340 public bool ModifyTerrain(ClientView simClient, Packet packet)
341 {
342 ModifyLandPacket modify = (ModifyLandPacket)packet;
343
344 switch (modify.ModifyBlock.Action)
345 {
346 case 1:
347 // raise terrain
348 if (modify.ParcelData.Length > 0)
349 {
350 Terrain.raise(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1);
351 RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West);
352 }
353 break;
354 case 2:
355 //lower terrain
356 if (modify.ParcelData.Length > 0)
357 {
358 Terrain.lower(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1);
359 RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West);
360 }
361 break;
362 }
363 return true;
364 }
365 */
366
367 } 260 }
368} 261}
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index bb24011..ec9bbc9 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -548,6 +548,7 @@ namespace OpenSim.world
548 agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation); 548 agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation);
549 agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale); 549 agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale);
550 agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject); 550 agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject);
551
551 Avatar newAvatar = null; 552 Avatar newAvatar = null;
552 try 553 try
553 { 554 {