aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Entity.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/PrimitiveOld.cs13
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs70
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Script.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs14
18 files changed, 86 insertions, 139 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs
index 6db57a4..c697faa 100644
--- a/OpenSim/Region/Environment/Scenes/Entity.cs
+++ b/OpenSim/Region/Environment/Scenes/Entity.cs
@@ -26,11 +26,8 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31using Axiom.MathLib;
32using OpenSim.Physics.Manager;
33using libsecondlife; 29using libsecondlife;
30using OpenSim.Physics.Manager;
34 31
35namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
36{ 33{
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 63f3f5d..a8eb9ce 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -1,6 +1,4 @@
1using System;
2using System.Collections.Generic; 1using System.Collections.Generic;
3using System.Text;
4using Axiom.MathLib; 2using Axiom.MathLib;
5using libsecondlife; 3using libsecondlife;
6 4
@@ -8,7 +6,7 @@ namespace OpenSim.Region.Environment.Scenes
8{ 6{
9 public abstract class EntityBase 7 public abstract class EntityBase
10 { 8 {
11 public libsecondlife.LLUUID uuid; 9 public LLUUID uuid;
12 10
13 protected List<EntityBase> children; 11 protected List<EntityBase> children;
14 12
@@ -83,7 +81,7 @@ namespace OpenSim.Region.Environment.Scenes
83 /// </summary> 81 /// </summary>
84 public EntityBase() 82 public EntityBase()
85 { 83 {
86 uuid = new libsecondlife.LLUUID(); 84 uuid = new LLUUID();
87 85
88 m_pos = new LLVector3(); 86 m_pos = new LLVector3();
89 velocity = new LLVector3(); 87 velocity = new LLVector3();
diff --git a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
index 36023d0..7c3a033 100644
--- a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
+++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
@@ -1,11 +1,6 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife; 1using libsecondlife;
5using libsecondlife.Packets; 2using libsecondlife.Packets;
6using OpenSim.Physics.Manager;
7using OpenSim.Framework.Interfaces; 3using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Types;
9 4
10namespace OpenSim.Region.Environment.Scenes 5namespace OpenSim.Region.Environment.Scenes
11{ 6{
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index b8ec68b..a767bd2 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -1,12 +1,11 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using Axiom.MathLib;
4using libsecondlife; 4using libsecondlife;
5using libsecondlife.Packets; 5using libsecondlife.Packets;
6using OpenSim.Framework.Interfaces; 6using OpenSim.Framework.Interfaces;
7using OpenSim.Physics.Manager;
8using OpenSim.Framework.Types;
9using OpenSim.Framework.Inventory; 7using OpenSim.Framework.Inventory;
8using OpenSim.Framework.Types;
10 9
11namespace OpenSim.Region.Environment.Scenes 10namespace OpenSim.Region.Environment.Scenes
12{ 11{
@@ -266,7 +265,7 @@ namespace OpenSim.Region.Environment.Scenes
266 public void SendTerseUpdateToClient(IClientAPI RemoteClient) 265 public void SendTerseUpdateToClient(IClientAPI RemoteClient)
267 { 266 {
268 LLVector3 lPos; 267 LLVector3 lPos;
269 Axiom.MathLib.Quaternion lRot; 268 Quaternion lRot;
270 269
271 lPos = this.Pos; 270 lPos = this.Pos;
272 lRot = this.rotation; 271 lRot = this.rotation;
diff --git a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
index d703857..4213a18 100644
--- a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
+++ b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs
@@ -29,12 +29,13 @@
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using Axiom.MathLib;
32using libsecondlife; 33using libsecondlife;
33using libsecondlife.Packets; 34using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
35using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types;
37using OpenSim.Framework.Inventory; 36using OpenSim.Framework.Inventory;
37using OpenSim.Framework.Types;
38using OpenSim.Physics.Manager;
38 39
39namespace OpenSim.Region.Environment.Scenes 40namespace OpenSim.Region.Environment.Scenes
40{ 41{
@@ -174,9 +175,9 @@ namespace OpenSim.Region.Environment.Scenes
174 dataArrays.Add(primData.ToBytes()); 175 dataArrays.Add(primData.ToBytes());
175 foreach (Entity child in children) 176 foreach (Entity child in children)
176 { 177 {
177 if (child is OpenSim.Region.Environment.Scenes.PrimitiveOld) 178 if (child is PrimitiveOld)
178 { 179 {
179 dataArrays.Add(((OpenSim.Region.Environment.Scenes.PrimitiveOld)child).GetByteArray()); 180 dataArrays.Add(((PrimitiveOld)child).GetByteArray());
180 } 181 }
181 } 182 }
182 byte[] primstart = Helpers.StringToField("<Prim>"); 183 byte[] primstart = Helpers.StringToField("<Prim>");
@@ -351,7 +352,7 @@ namespace OpenSim.Region.Environment.Scenes
351 /// <returns></returns> 352 /// <returns></returns>
352 public byte[] ConvertInventoryToBytes() 353 public byte[] ConvertInventoryToBytes()
353 { 354 {
354 System.Text.Encoding enc = System.Text.Encoding.ASCII; 355 Encoding enc = Encoding.ASCII;
355 byte[] result = new byte[0]; 356 byte[] result = new byte[0];
356 List<byte[]> inventoryData = new List<byte[]>(); 357 List<byte[]> inventoryData = new List<byte[]>();
357 int totallength = 0; 358 int totallength = 0;
@@ -434,7 +435,7 @@ namespace OpenSim.Region.Environment.Scenes
434 public void SendTerseUpdateToClient(IClientAPI RemoteClient) 435 public void SendTerseUpdateToClient(IClientAPI RemoteClient)
435 { 436 {
436 LLVector3 lPos; 437 LLVector3 lPos;
437 Axiom.MathLib.Quaternion lRot; 438 Quaternion lRot;
438 if (this._physActor != null && this.physicsEnabled) //is this needed ? doesn't the property fields do this for us? 439 if (this._physActor != null && this.physicsEnabled) //is this needed ? doesn't the property fields do this for us?
439 { 440 {
440 PhysicsVector pPos = this._physActor.Position; 441 PhysicsVector pPos = this._physActor.Position;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index d8533b0..669039f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -27,14 +27,10 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text;
31using libsecondlife; 30using libsecondlife;
32using libsecondlife.Packets; 31using libsecondlife.Packets;
33using OpenSim.Physics.Manager;
34using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
36using OpenSim.Framework.Inventory;
37using OpenSim.Framework.Utilities;
38 34
39namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
40{ 36{
@@ -253,7 +249,7 @@ namespace OpenSim.Region.Environment.Scenes
253 { 249 {
254 if (((SceneObject)ent).rootLocalID == primLocalID) 250 if (((SceneObject)ent).rootLocalID == primLocalID)
255 { 251 {
256 ((OpenSim.Region.Environment.Scenes.SceneObject)ent).GetProperites(remoteClient); 252 ((SceneObject)ent).GetProperites(remoteClient);
257 break; 253 break;
258 } 254 }
259 } 255 }
@@ -349,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes
349 { 345 {
350 if (ent.LocalId == localID) 346 if (ent.LocalId == localID)
351 { 347 {
352 ((OpenSim.Region.Environment.Scenes.PrimitiveOld)ent).UpdatePosition(pos); 348 ((PrimitiveOld)ent).UpdatePosition(pos);
353 break; 349 break;
354 } 350 }
355 } 351 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 059bfd7..2bc3f8c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -26,27 +26,23 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife;
30using libsecondlife.Packets;
31using System.Collections.Generic; 29using System.Collections.Generic;
32using System.Text;
33using System.Reflection;
34using System.IO;
35using System.Threading; 30using System.Threading;
36using System.Timers; 31using System.Timers;
37using OpenSim.Physics.Manager; 32using libsecondlife;
38using OpenSim.Framework.Interfaces; 33using libsecondlife.Packets;
39using OpenSim.Framework.Types;
40using OpenSim.Framework.Inventory;
41using OpenSim.Framework; 34using OpenSim.Framework;
42using OpenSim.Region.Terrain;
43using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
44using OpenSim.Region.Caches; 36using OpenSim.Framework.Console;
45using OpenSim.Region.Environment; 37using OpenSim.Framework.Interfaces;
46using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Types;
40using OpenSim.Physics.Manager;
41using OpenSim.Region.Caches;
47using OpenSim.Region.Enviorment.Scripting; 42using OpenSim.Region.Enviorment.Scripting;
48using OpenSim.Region.Capabilities; 43using OpenSim.Region.Terrain;
49using Caps = OpenSim.Region.Capabilities.Caps; 44using Caps=OpenSim.Region.Capabilities.Caps;
45using Timer=System.Timers.Timer;
50 46
51namespace OpenSim.Region.Environment.Scenes 47namespace OpenSim.Region.Environment.Scenes
52{ 48{
@@ -54,9 +50,9 @@ namespace OpenSim.Region.Environment.Scenes
54 50
55 public partial class Scene : SceneBase, ILocalStorageReceiver 51 public partial class Scene : SceneBase, ILocalStorageReceiver
56 { 52 {
57 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); 53 protected Timer m_heartbeatTimer = new Timer();
58 protected Dictionary<libsecondlife.LLUUID, ScenePresence> Avatars; 54 protected Dictionary<LLUUID, ScenePresence> Avatars;
59 protected Dictionary<libsecondlife.LLUUID, SceneObject> Prims; 55 protected Dictionary<LLUUID, SceneObject> Prims;
60 private PhysicsScene phyScene; 56 private PhysicsScene phyScene;
61 private float timeStep = 0.1f; 57 private float timeStep = 0.1f;
62 private Random Rand = new Random(); 58 private Random Rand = new Random();
@@ -119,12 +115,12 @@ namespace OpenSim.Region.Environment.Scenes
119 scriptManager = new ScriptManager(this); 115 scriptManager = new ScriptManager(this);
120 eventManager = new EventManager(); 116 eventManager = new EventManager();
121 117
122 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance"); 118 MainLog.Instance.Verbose("World.cs - creating new entitities instance");
123 Entities = new Dictionary<libsecondlife.LLUUID, EntityBase>(); 119 Entities = new Dictionary<LLUUID, EntityBase>();
124 Avatars = new Dictionary<LLUUID, ScenePresence>(); 120 Avatars = new Dictionary<LLUUID, ScenePresence>();
125 Prims = new Dictionary<LLUUID, SceneObject>(); 121 Prims = new Dictionary<LLUUID, SceneObject>();
126 122
127 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap"); 123 MainLog.Instance.Verbose("World.cs - creating LandMap");
128 Terrain = new TerrainEngine(); 124 Terrain = new TerrainEngine();
129 125
130 ScenePresence.LoadAnims(); 126 ScenePresence.LoadAnims();
@@ -151,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes
151 /// </summary> 147 /// </summary>
152 /// <param name="sender"></param> 148 /// <param name="sender"></param>
153 /// <param name="e"></param> 149 /// <param name="e"></param>
154 void Heartbeat(object sender, System.EventArgs e) 150 void Heartbeat(object sender, EventArgs e)
155 { 151 {
156 this.Update(); 152 this.Update();
157 } 153 }
@@ -170,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes
170 166
171 } 167 }
172 168
173 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 169 foreach (LLUUID UUID in Entities.Keys)
174 { 170 {
175 Entities[UUID].updateMovement(); 171 Entities[UUID].updateMovement();
176 } 172 }
@@ -180,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes
180 this.phyScene.Simulate(timeStep); 176 this.phyScene.Simulate(timeStep);
181 } 177 }
182 178
183 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 179 foreach (LLUUID UUID in Entities.Keys)
184 { 180 {
185 Entities[UUID].update(); 181 Entities[UUID].update();
186 } 182 }
@@ -198,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes
198 } 194 }
199 catch (Exception e) 195 catch (Exception e)
200 { 196 {
201 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); 197 MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString());
202 } 198 }
203 updateLock.ReleaseMutex(); 199 updateLock.ReleaseMutex();
204 200
@@ -237,14 +233,14 @@ namespace OpenSim.Region.Environment.Scenes
237 this.SendLayerData(client); 233 this.SendLayerData(client);
238 } 234 }
239 235
240 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 236 foreach (LLUUID UUID in Entities.Keys)
241 { 237 {
242 Entities[UUID].LandRenegerated(); 238 Entities[UUID].LandRenegerated();
243 } 239 }
244 } 240 }
245 catch (Exception e) 241 catch (Exception e)
246 { 242 {
247 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 243 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
248 } 244 }
249 } 245 }
250 246
@@ -268,14 +264,14 @@ namespace OpenSim.Region.Environment.Scenes
268 this.SendLayerData(client); 264 this.SendLayerData(client);
269 } 265 }
270 266
271 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 267 foreach (LLUUID UUID in Entities.Keys)
272 { 268 {
273 Entities[UUID].LandRenegerated(); 269 Entities[UUID].LandRenegerated();
274 } 270 }
275 } 271 }
276 catch (Exception e) 272 catch (Exception e)
277 { 273 {
278 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 274 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
279 } 275 }
280 } 276 }
281 277
@@ -301,7 +297,7 @@ namespace OpenSim.Region.Environment.Scenes
301 } 297 }
302 catch (Exception e) 298 catch (Exception e)
303 { 299 {
304 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 300 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
305 } 301 }
306 } 302 }
307 303
@@ -351,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes
351 } 347 }
352 catch (Exception e) 348 catch (Exception e)
353 { 349 {
354 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 350 MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
355 } 351 }
356 } 352 }
357 353
@@ -382,12 +378,12 @@ namespace OpenSim.Region.Environment.Scenes
382 { 378 {
383 try 379 try
384 { 380 {
385 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); 381 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
386 this.localStorage.LoadPrimitives(this); 382 this.localStorage.LoadPrimitives(this);
387 } 383 }
388 catch (Exception e) 384 catch (Exception e)
389 { 385 {
390 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); 386 MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
391 } 387 }
392 } 388 }
393 389
@@ -428,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes
428 } 424 }
429 catch (Exception e) 425 catch (Exception e)
430 { 426 {
431 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); 427 MainLog.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString());
432 } 428 }
433 } 429 }
434 430
@@ -482,10 +478,10 @@ namespace OpenSim.Region.Environment.Scenes
482 { 478 {
483 ScenePresence newAvatar = null; 479 ScenePresence newAvatar = null;
484 480
485 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 481 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
486 newAvatar = new ScenePresence(client, this, this.m_regInfo); 482 newAvatar = new ScenePresence(client, this, this.m_regInfo);
487 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world"); 483 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world");
488 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake "); 484 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake ");
489 485
490 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 486 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
491 lock (this.m_syncRoot) 487 lock (this.m_syncRoot)
@@ -638,7 +634,7 @@ namespace OpenSim.Region.Environment.Scenes
638 } 634 }
639 } 635 }
640 636
641 public void AgentCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) 637 public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
642 { 638 {
643 if (regionHandle == this.m_regInfo.RegionHandle) 639 if (regionHandle == this.m_regInfo.RegionHandle)
644 { 640 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 817f206..4036743 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -26,25 +26,20 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife;
30using libsecondlife.Packets;
31using System.Collections.Generic; 29using System.Collections.Generic;
32using System.Text;
33using System.Reflection; 30using System.Reflection;
34using System.IO; 31using libsecondlife;
35using System.Threading; 32using OpenSim.Framework.Console;
36using OpenSim.Physics.Manager;
37using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
39using OpenSim.Framework.Inventory;
40using OpenSim.Region.Terrain;
41using OpenSim.Region.Caches; 35using OpenSim.Region.Caches;
36using OpenSim.Region.Terrain;
42 37
43namespace OpenSim.Region.Environment.Scenes 38namespace OpenSim.Region.Environment.Scenes
44{ 39{
45 public abstract class SceneBase : IWorld 40 public abstract class SceneBase : IWorld
46 { 41 {
47 public Dictionary<libsecondlife.LLUUID, EntityBase> Entities; 42 public Dictionary<LLUUID, EntityBase> Entities;
48 protected Dictionary<uint, IClientAPI> m_clientThreads; 43 protected Dictionary<uint, IClientAPI> m_clientThreads;
49 protected ulong m_regionHandle; 44 protected ulong m_regionHandle;
50 protected string m_regionName; 45 protected string m_regionName;
@@ -113,7 +108,7 @@ namespace OpenSim.Region.Environment.Scenes
113 } 108 }
114 catch (Exception e) 109 catch (Exception e)
115 { 110 {
116 OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); 111 MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
117 return false; 112 return false;
118 } 113 }
119 } 114 }
@@ -191,7 +186,7 @@ namespace OpenSim.Region.Environment.Scenes
191 } 186 }
192 catch (Exception e) 187 catch (Exception e)
193 { 188 {
194 OpenSim.Framework.Console.MainLog.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); 189 MainLog.Instance.WriteLine(LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString());
195 } 190 }
196 } 191 }
197 192
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index ac887c0..9e383c6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -1,6 +1,4 @@
1using System; 1using libsecondlife;
2using System.Collections.Generic;
3using System.Text;
4 2
5namespace OpenSim.Region.Environment.Scenes 3namespace OpenSim.Region.Environment.Scenes
6{ 4{
@@ -18,7 +16,7 @@ namespace OpenSim.Region.Environment.Scenes
18 public delegate void OnNewPrimitiveDelegate(PrimitiveOld prim); 16 public delegate void OnNewPrimitiveDelegate(PrimitiveOld prim);
19 public event OnNewPrimitiveDelegate OnNewPrimitive; 17 public event OnNewPrimitiveDelegate OnNewPrimitive;
20 18
21 public delegate void OnRemovePresenceDelegate(libsecondlife.LLUUID uuid); 19 public delegate void OnRemovePresenceDelegate(LLUUID uuid);
22 public event OnRemovePresenceDelegate OnRemovePresence; 20 public event OnRemovePresenceDelegate OnRemovePresence;
23 21
24 public void TriggerOnFrame() 22 public void TriggerOnFrame()
@@ -41,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes
41 OnNewPresence(presence); 39 OnNewPresence(presence);
42 } 40 }
43 41
44 public void TriggerOnRemovePresence(libsecondlife.LLUUID uuid) 42 public void TriggerOnRemovePresence(LLUUID uuid)
45 { 43 {
46 if (OnRemovePresence != null) 44 if (OnRemovePresence != null)
47 { 45 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index c03354e..04ed408 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -25,21 +25,18 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Text; 29using System.Text;
31using libsecondlife; 30using libsecondlife;
32using libsecondlife.Packets; 31using libsecondlife.Packets;
33using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
34using OpenSim.Physics.Manager; 33using OpenSim.Physics.Manager;
35using OpenSim.Framework.Types;
36using OpenSim.Framework.Inventory;
37 34
38namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
39{ 36{
40 public class SceneObject : EntityBase 37 public class SceneObject : EntityBase
41 { 38 {
42 private System.Text.Encoding enc = System.Text.Encoding.ASCII; 39 private Encoding enc = Encoding.ASCII;
43 private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group 40 private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group
44 public Primitive rootPrimitive; 41 public Primitive rootPrimitive;
45 private Scene m_world; 42 private Scene m_world;
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
index 2caabc2..d1f75ed 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
@@ -25,11 +25,9 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using System.Xml; 29using System.Xml;
30using libsecondlife;
33 31
34namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
35{ 33{
@@ -66,7 +64,7 @@ namespace OpenSim.Region.Environment.Scenes
66 64
67 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 65 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
68 66
69 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Environment.Scenes.ScenePresence.Animations.AnimsLLUUID) 67 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID)
70 { 68 {
71 AnimsNames.Add(kp.Value, kp.Key); 69 AnimsNames.Add(kp.Value, kp.Key);
72 } 70 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
index 2c81d2a..dbb5d3f 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
@@ -25,14 +25,9 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife; 28using libsecondlife;
32using libsecondlife.Packets; 29using libsecondlife.Packets;
33using OpenSim.Physics.Manager;
34using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36 31
37namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
38{ 33{
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 8a8f5ae..dcca848 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -28,14 +28,13 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Text; 31using Axiom.MathLib;
32using libsecondlife; 32using libsecondlife;
33using libsecondlife.Packets; 33using libsecondlife.Packets;
34using OpenSim.Physics.Manager; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
38using Axiom.MathLib; 37using OpenSim.Physics.Manager;
39 38
40namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
41{ 40{
@@ -53,7 +52,7 @@ namespace OpenSim.Region.Environment.Scenes
53 private byte movementflag = 0; 52 private byte movementflag = 0;
54 private List<NewForce> forcesList = new List<NewForce>(); 53 private List<NewForce> forcesList = new List<NewForce>();
55 private short _updateCount = 0; 54 private short _updateCount = 0;
56 private Axiom.MathLib.Quaternion bodyRot; 55 private Quaternion bodyRot;
57 private LLObject.TextureEntry avatarAppearanceTexture = null; 56 private LLObject.TextureEntry avatarAppearanceTexture = null;
58 private byte[] visualParams; 57 private byte[] visualParams;
59 private AvatarWearable[] Wearables; 58 private AvatarWearable[] Wearables;
@@ -110,7 +109,7 @@ namespace OpenSim.Region.Environment.Scenes
110 109
111 m_regionInfo = reginfo; 110 m_regionInfo = reginfo;
112 m_regionHandle = reginfo.RegionHandle; 111 m_regionHandle = reginfo.RegionHandle;
113 OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs "); 112 MainLog.Instance.Verbose("Avatar.cs ");
114 ControllingClient = theClient; 113 ControllingClient = theClient;
115 this.firstname = ControllingClient.FirstName; 114 this.firstname = ControllingClient.FirstName;
116 this.lastname = ControllingClient.LastName; 115 this.lastname = ControllingClient.LastName;
@@ -240,7 +239,7 @@ namespace OpenSim.Region.Environment.Scenes
240 bool update_rotation = false; 239 bool update_rotation = false;
241 bool DCFlagKeyPressed = false; 240 bool DCFlagKeyPressed = false;
242 Vector3 agent_control_v3 = new Vector3(0, 0, 0); 241 Vector3 agent_control_v3 = new Vector3(0, 0, 0);
243 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 242 Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
244 243
245 this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); 244 this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0);
246 245
@@ -278,10 +277,10 @@ namespace OpenSim.Region.Environment.Scenes
278 277
279 } 278 }
280 279
281 protected void AddNewMovement(Axiom.MathLib.Vector3 vec, Axiom.MathLib.Quaternion rotation) 280 protected void AddNewMovement(Vector3 vec, Quaternion rotation)
282 { 281 {
283 NewForce newVelocity = new NewForce(); 282 NewForce newVelocity = new NewForce();
284 Axiom.MathLib.Vector3 direc = rotation * vec; 283 Vector3 direc = rotation * vec;
285 direc.Normalize(); 284 direc.Normalize();
286 285
287 direc = direc * ((0.03f) * 128f); 286 direc = direc * ((0.03f) * 128f);
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs
index fc193f5..56f5c0b 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs
@@ -26,13 +26,10 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31
32// Compilation stuff
33using System.CodeDom;
34using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic;
35using Microsoft.CSharp; 31using Microsoft.CSharp;
32using OpenSim.Framework.Console;
36 33
37namespace OpenSim.Region.Enviorment.Scripting 34namespace OpenSim.Region.Enviorment.Scripting
38{ 35{
@@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting
60 57
61 if (compilerResults.Errors.Count > 0) 58 if (compilerResults.Errors.Count > 0)
62 { 59 {
63 OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); 60 MainLog.Instance.Error("Compile errors");
64 foreach (CompilerError error in compilerResults.Errors) 61 foreach (CompilerError error in compilerResults.Errors)
65 { 62 {
66 OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); 63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString());
67 } 64 }
68 } 65 }
69 else 66 else
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs
index e6d66eb..2cea6e0 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs
@@ -26,13 +26,10 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31
32// Compilation stuff
33using System.CodeDom;
34using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic;
35using Microsoft.JScript; 31using Microsoft.JScript;
32using OpenSim.Framework.Console;
36 33
37namespace OpenSim.Region.Enviorment.Scripting 34namespace OpenSim.Region.Enviorment.Scripting
38{ 35{
@@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting
60 57
61 if (compilerResults.Errors.Count > 0) 58 if (compilerResults.Errors.Count > 0)
62 { 59 {
63 OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); 60 MainLog.Instance.Error("Compile errors");
64 foreach (CompilerError error in compilerResults.Errors) 61 foreach (CompilerError error in compilerResults.Errors)
65 { 62 {
66 OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); 63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString());
67 } 64 }
68 } 65 }
69 else 66 else
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
index 1e64675..8029883 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Script.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
@@ -25,13 +25,6 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using OpenSim.Framework.Console;
33using OpenSim.Framework;
34using OpenSim.Region.Environment;
35using OpenSim.Region.Environment.Scenes; 28using OpenSim.Region.Environment.Scenes;
36 29
37namespace OpenSim.Region.Enviorment.Scripting 30namespace OpenSim.Region.Enviorment.Scripting
@@ -54,7 +47,7 @@ namespace OpenSim.Region.Enviorment.Scripting
54 public void Initialise(ScriptInfo scriptInfo) 47 public void Initialise(ScriptInfo scriptInfo)
55 { 48 {
56 script = scriptInfo; 49 script = scriptInfo;
57 script.events.OnFrame += new OpenSim.Region.Environment.Scenes.EventManager.OnFrameDelegate(events_OnFrame); 50 script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame);
58 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); 51 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
59 } 52 }
60 53
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
index 522a572..d984d60 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
@@ -25,12 +25,8 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Console; 28using OpenSim.Framework.Console;
29using OpenSim.Region.Environment.Scenes;
34 30
35namespace OpenSim.Region.Enviorment.Scripting 31namespace OpenSim.Region.Enviorment.Scripting
36{ 32{
@@ -52,7 +48,7 @@ namespace OpenSim.Region.Enviorment.Scripting
52 { 48 {
53 world = scene; 49 world = scene;
54 events = world.eventManager; 50 events = world.eventManager;
55 logger = OpenSim.Framework.Console.MainLog.Instance; 51 logger = MainLog.Instance;
56 } 52 }
57 } 53 }
58} 54}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
index eb1c1d9..1d47c24 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
@@ -25,16 +25,16 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Text; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes;
31 31
32namespace OpenSim.Region.Enviorment.Scripting 32namespace OpenSim.Region.Enviorment.Scripting
33{ 33{
34 public class ScriptManager 34 public class ScriptManager
35 { 35 {
36 List<IScript> scripts = new List<IScript>(); 36 List<IScript> scripts = new List<IScript>();
37 OpenSim.Region.Environment.Scenes.Scene scene; 37 Scene scene;
38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); 38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>();
39 39
40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) 40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts)
@@ -42,14 +42,14 @@ namespace OpenSim.Region.Enviorment.Scripting
42 foreach (KeyValuePair<string, IScript> script in compiledscripts) 42 foreach (KeyValuePair<string, IScript> script in compiledscripts)
43 { 43 {
44 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. 44 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
45 OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading " + script.Key); 45 MainLog.Instance.Verbose("Loading " + script.Key);
46 script.Value.Initialise(scriptInfo); 46 script.Value.Initialise(scriptInfo);
47 scripts.Add(script.Value); 47 scripts.Add(script.Value);
48 } 48 }
49 OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); 49 MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)");
50 } 50 }
51 51
52 public ScriptManager(OpenSim.Region.Environment.Scenes.Scene world) 52 public ScriptManager(Scene world)
53 { 53 {
54 scene = world; 54 scene = world;
55 55
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Enviorment.Scripting
82 break; 82 break;
83 83
84 default: 84 default:
85 OpenSim.Framework.Console.MainLog.Instance.Error("Unknown script command"); 85 MainLog.Instance.Error("Unknown script command");
86 break; 86 break;
87 } 87 }
88 } 88 }