diff options
Switched in NameSpaceChanges
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Entity.cs (renamed from OpenSim/OpenSim.Region/Scenes/Entity.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs (renamed from OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs (renamed from OpenSim/OpenSim.Region/Scenes/Primitive.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs (renamed from OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs (renamed from OpenSim/OpenSim.Region/Scenes/Scene.cs) | 25 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs (renamed from OpenSim/OpenSim.Region/Scenes/SceneBase.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneEvents.cs | 52 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObject.cs (renamed from OpenSim/OpenSim.Region/Scenes/SceneObject.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs) | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.cs) | 82 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/Script.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Script.cs) | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs) | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs) | 9 |
16 files changed, 145 insertions, 69 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs index 77f8854..db5070d 100644 --- a/OpenSim/OpenSim.Region/Scenes/Entity.cs +++ b/OpenSim/Region/Environment/Scenes/Entity.cs | |||
@@ -32,7 +32,7 @@ using Axiom.MathLib; | |||
32 | using OpenSim.Physics.Manager; | 32 | using OpenSim.Physics.Manager; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | 34 | ||
35 | namespace OpenSim.Region.Scenes | 35 | namespace OpenSim.Region.Environment.Scenes |
36 | { | 36 | { |
37 | public abstract class Entity | 37 | public abstract class Entity |
38 | { | 38 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs index 65077e6..36023d0 100644 --- a/OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs +++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs | |||
@@ -7,7 +7,7 @@ using OpenSim.Physics.Manager; | |||
7 | using OpenSim.Framework.Interfaces; | 7 | using OpenSim.Framework.Interfaces; |
8 | using OpenSim.Framework.Types; | 8 | using OpenSim.Framework.Types; |
9 | 9 | ||
10 | namespace OpenSim.Region.Scenes | 10 | namespace OpenSim.Region.Environment.Scenes |
11 | { | 11 | { |
12 | public interface IScenePresenceBody | 12 | public interface IScenePresenceBody |
13 | { | 13 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index e04c711..0f649b2 100644 --- a/OpenSim/OpenSim.Region/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -36,7 +36,7 @@ using OpenSim.Physics.Manager; | |||
36 | using OpenSim.Framework.Types; | 36 | using OpenSim.Framework.Types; |
37 | using OpenSim.Framework.Inventory; | 37 | using OpenSim.Framework.Inventory; |
38 | 38 | ||
39 | namespace OpenSim.Region.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 40 | { |
41 | public class Primitive : Entity | 41 | public class Primitive : Entity |
42 | { | 42 | { |
@@ -174,9 +174,9 @@ namespace OpenSim.Region.Scenes | |||
174 | dataArrays.Add(primData.ToBytes()); | 174 | dataArrays.Add(primData.ToBytes()); |
175 | foreach (Entity child in children) | 175 | foreach (Entity child in children) |
176 | { | 176 | { |
177 | if (child is OpenSim.Region.Scenes.Primitive) | 177 | if (child is OpenSim.Region.Environment.Scenes.Primitive) |
178 | { | 178 | { |
179 | dataArrays.Add(((OpenSim.Region.Scenes.Primitive)child).GetByteArray()); | 179 | dataArrays.Add(((OpenSim.Region.Environment.Scenes.Primitive)child).GetByteArray()); |
180 | } | 180 | } |
181 | } | 181 | } |
182 | byte[] primstart = Helpers.StringToField("<Prim>"); | 182 | byte[] primstart = Helpers.StringToField("<Prim>"); |
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index d1a2717..1d55c4d 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -36,7 +36,7 @@ using OpenSim.Framework.Types; | |||
36 | using OpenSim.Framework.Inventory; | 36 | using OpenSim.Framework.Inventory; |
37 | using OpenSim.Framework.Utilities; | 37 | using OpenSim.Framework.Utilities; |
38 | 38 | ||
39 | namespace OpenSim.Region.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 40 | { |
41 | public partial class Scene | 41 | public partial class Scene |
42 | { | 42 | { |
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Scenes | |||
218 | { | 218 | { |
219 | if (ent.LocalId == primLocalID) | 219 | if (ent.LocalId == primLocalID) |
220 | { | 220 | { |
221 | ((OpenSim.Region.Scenes.Primitive)ent).GetProperites(remoteClient); | 221 | ((OpenSim.Region.Environment.Scenes.Primitive)ent).GetProperites(remoteClient); |
222 | break; | 222 | break; |
223 | } | 223 | } |
224 | } | 224 | } |
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Scenes | |||
266 | { | 266 | { |
267 | if (ent.LocalId == localID) | 267 | if (ent.LocalId == localID) |
268 | { | 268 | { |
269 | ((OpenSim.Region.Scenes.Primitive)ent).UpdatePosition(pos); | 269 | ((OpenSim.Region.Environment.Scenes.Primitive)ent).UpdatePosition(pos); |
270 | break; | 270 | break; |
271 | } | 271 | } |
272 | } | 272 | } |
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f7d90fa..8c912d0 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -39,18 +39,20 @@ using OpenSim.Framework.Interfaces; | |||
39 | using OpenSim.Framework.Types; | 39 | using OpenSim.Framework.Types; |
40 | using OpenSim.Framework.Inventory; | 40 | using OpenSim.Framework.Inventory; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Terrain; | 42 | using OpenSim.Region.Terrain; |
43 | using OpenGrid.Framework.Communications; | 43 | using OpenSim.Framework.Communications; |
44 | using OpenSim.Caches; | 44 | using OpenSim.Region.Caches; |
45 | using OpenSim.Region; | 45 | using OpenSim.Region.Environment; |
46 | using OpenSim.Servers; | 46 | using OpenSim.Framework.Servers; |
47 | using OpenSim.Scripting; | 47 | using OpenSim.Region.Enviorment.Scripting; |
48 | 48 | using OpenSim.Region.Capabilities; | |
49 | namespace OpenSim.Region.Scenes | 49 | using Caps = OpenSim.Region.Capabilities.Caps; |
50 | |||
51 | namespace OpenSim.Region.Environment.Scenes | ||
50 | { | 52 | { |
51 | public delegate bool FilterAvatarList(ScenePresence avatar); | 53 | public delegate bool FilterAvatarList(ScenePresence avatar); |
52 | 54 | ||
53 | public partial class Scene : SceneBase, ILocalStorageReceiver, IScriptAPI | 55 | public partial class Scene : SceneBase, ILocalStorageReceiver |
54 | { | 56 | { |
55 | protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); | 57 | protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); |
56 | protected Dictionary<libsecondlife.LLUUID, ScenePresence> Avatars; | 58 | protected Dictionary<libsecondlife.LLUUID, ScenePresence> Avatars; |
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Scenes | |||
66 | protected RegionCommsListener regionCommsHost; | 68 | protected RegionCommsListener regionCommsHost; |
67 | protected CommunicationsManager commsManager; | 69 | protected CommunicationsManager commsManager; |
68 | 70 | ||
69 | protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); | 71 | protected Dictionary<LLUUID,Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); |
70 | protected BaseHttpServer httpListener; | 72 | protected BaseHttpServer httpListener; |
71 | 73 | ||
72 | public ParcelManager parcelManager; | 74 | public ParcelManager parcelManager; |
@@ -503,6 +505,7 @@ namespace OpenSim.Region.Scenes | |||
503 | remoteClient.OnTeleportLocationRequest += this.RequestTeleportLocation; | 505 | remoteClient.OnTeleportLocationRequest += this.RequestTeleportLocation; |
504 | //remoteClient.OnObjectSelect += this.SelectPrim; | 506 | //remoteClient.OnObjectSelect += this.SelectPrim; |
505 | remoteClient.OnGrapUpdate += this.MoveObject; | 507 | remoteClient.OnGrapUpdate += this.MoveObject; |
508 | remoteClient.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest; | ||
506 | 509 | ||
507 | /* remoteClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(parcelManager.handleParcelPropertiesRequest); | 510 | /* remoteClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(parcelManager.handleParcelPropertiesRequest); |
508 | remoteClient.OnParcelDivideRequest += new ParcelDivideRequest(parcelManager.handleParcelDivideRequest); | 511 | remoteClient.OnParcelDivideRequest += new ParcelDivideRequest(parcelManager.handleParcelDivideRequest); |
@@ -510,7 +513,7 @@ namespace OpenSim.Region.Scenes | |||
510 | remoteClient.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); | 513 | remoteClient.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); |
511 | remoteClient.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); | 514 | remoteClient.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); |
512 | */ | 515 | */ |
513 | 516 | ||
514 | ScenePresence newAvatar = null; | 517 | ScenePresence newAvatar = null; |
515 | try | 518 | try |
516 | { | 519 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 5275fcf..50d3b82 100644 --- a/OpenSim/OpenSim.Region/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -37,10 +37,10 @@ using OpenSim.Physics.Manager; | |||
37 | using OpenSim.Framework.Interfaces; | 37 | using OpenSim.Framework.Interfaces; |
38 | using OpenSim.Framework.Types; | 38 | using OpenSim.Framework.Types; |
39 | using OpenSim.Framework.Inventory; | 39 | using OpenSim.Framework.Inventory; |
40 | using OpenSim.Terrain; | 40 | using OpenSim.Region.Terrain; |
41 | using OpenSim.Caches; | 41 | using OpenSim.Region.Caches; |
42 | 42 | ||
43 | namespace OpenSim.Region.Scenes | 43 | namespace OpenSim.Region.Environment.Scenes |
44 | { | 44 | { |
45 | public abstract class SceneBase : IWorld | 45 | public abstract class SceneBase : IWorld |
46 | { | 46 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs new file mode 100644 index 0000000..fa1bacb --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs | |||
@@ -0,0 +1,52 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.Scenes | ||
6 | { | ||
7 | /// <summary> | ||
8 | /// A class for triggering remote scene events. | ||
9 | /// </summary> | ||
10 | public class EventManager | ||
11 | { | ||
12 | public delegate void OnFrameDelegate(); | ||
13 | public event OnFrameDelegate OnFrame; | ||
14 | |||
15 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | ||
16 | public event OnNewPresenceDelegate OnNewPresence; | ||
17 | |||
18 | public delegate void OnNewPrimitiveDelegate(Primitive prim); | ||
19 | public event OnNewPrimitiveDelegate OnNewPrimitive; | ||
20 | |||
21 | public delegate void OnRemovePresenceDelegate(libsecondlife.LLUUID uuid); | ||
22 | public event OnRemovePresenceDelegate OnRemovePresence; | ||
23 | |||
24 | public void TriggerOnFrame() | ||
25 | { | ||
26 | if (OnFrame != null) | ||
27 | { | ||
28 | OnFrame(); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | public void TriggerOnNewPrimitive(Primitive prim) | ||
33 | { | ||
34 | if (OnNewPrimitive != null) | ||
35 | OnNewPrimitive(prim); | ||
36 | } | ||
37 | |||
38 | public void TriggerOnNewPresence(ScenePresence presence) | ||
39 | { | ||
40 | if (OnNewPresence != null) | ||
41 | OnNewPresence(presence); | ||
42 | } | ||
43 | |||
44 | public void TriggerOnRemovePresence(libsecondlife.LLUUID uuid) | ||
45 | { | ||
46 | if (OnRemovePresence != null) | ||
47 | { | ||
48 | OnRemovePresence(uuid); | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | } | ||
diff --git a/OpenSim/OpenSim.Region/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index 5df87bf..88fb160 100644 --- a/OpenSim/OpenSim.Region/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs | |||
@@ -35,7 +35,7 @@ using OpenSim.Physics.Manager; | |||
35 | using OpenSim.Framework.Types; | 35 | using OpenSim.Framework.Types; |
36 | using OpenSim.Framework.Inventory; | 36 | using OpenSim.Framework.Inventory; |
37 | 37 | ||
38 | namespace OpenSim.Region.Scenes | 38 | namespace OpenSim.Region.Environment.Scenes |
39 | { | 39 | { |
40 | public class SceneObject : Entity | 40 | public class SceneObject : Entity |
41 | { | 41 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs index f0a8721..2caabc2 100644 --- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs | |||
@@ -31,7 +31,7 @@ using System.Text; | |||
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using System.Xml; | 32 | using System.Xml; |
33 | 33 | ||
34 | namespace OpenSim.Region.Scenes | 34 | namespace OpenSim.Region.Environment.Scenes |
35 | { | 35 | { |
36 | partial class ScenePresence | 36 | partial class ScenePresence |
37 | { | 37 | { |
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Scenes | |||
66 | 66 | ||
67 | // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 67 | // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
68 | 68 | ||
69 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Scenes.ScenePresence.Animations.AnimsLLUUID) | 69 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Environment.Scenes.ScenePresence.Animations.AnimsLLUUID) |
70 | { | 70 | { |
71 | AnimsNames.Add(kp.Value, kp.Key); | 71 | AnimsNames.Add(kp.Value, kp.Key); |
72 | } | 72 | } |
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs index d21b11f..2c81d2a 100644 --- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs | |||
@@ -34,7 +34,7 @@ using OpenSim.Physics.Manager; | |||
34 | using OpenSim.Framework.Interfaces; | 34 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Framework.Types; | 35 | using OpenSim.Framework.Types; |
36 | 36 | ||
37 | namespace OpenSim.Region.Scenes | 37 | namespace OpenSim.Region.Environment.Scenes |
38 | { | 38 | { |
39 | partial class ScenePresence | 39 | partial class ScenePresence |
40 | { | 40 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 45d3fed..b90004e 100644 --- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -37,7 +37,7 @@ using OpenSim.Framework.Interfaces; | |||
37 | using OpenSim.Framework.Types; | 37 | using OpenSim.Framework.Types; |
38 | using Axiom.MathLib; | 38 | using Axiom.MathLib; |
39 | 39 | ||
40 | namespace OpenSim.Region.Scenes | 40 | namespace OpenSim.Region.Environment.Scenes |
41 | { | 41 | { |
42 | public partial class ScenePresence : Entity | 42 | public partial class ScenePresence : Entity |
43 | { | 43 | { |
@@ -66,6 +66,17 @@ namespace OpenSim.Region.Scenes | |||
66 | 66 | ||
67 | protected RegionInfo m_regionInfo; | 67 | protected RegionInfo m_regionInfo; |
68 | 68 | ||
69 | private Vector3[] Dir_Vectors = new Vector3[6]; | ||
70 | private enum Dir_ControlFlags | ||
71 | { | ||
72 | DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS, | ||
73 | DIR_CONTROL_FLAG_BACK = MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG, | ||
74 | DIR_CONTROL_FLAG_LEFT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_POS, | ||
75 | DIR_CONTROL_FLAG_RIGHT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_NEG, | ||
76 | DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS, | ||
77 | DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG | ||
78 | } | ||
79 | |||
69 | #region Properties | 80 | #region Properties |
70 | /// <summary> | 81 | /// <summary> |
71 | /// | 82 | /// |
@@ -125,6 +136,13 @@ namespace OpenSim.Region.Scenes | |||
125 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 136 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
126 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 137 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
127 | 138 | ||
139 | Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD | ||
140 | Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK | ||
141 | Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT | ||
142 | Dir_Vectors[3] = new Vector3(0, -1, 0); //RIGHT | ||
143 | Dir_Vectors[4] = new Vector3(0, 0, 1); //UP | ||
144 | Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN | ||
145 | |||
128 | } | 146 | } |
129 | #endregion | 147 | #endregion |
130 | 148 | ||
@@ -216,40 +234,46 @@ namespace OpenSim.Region.Scenes | |||
216 | /// </summary> | 234 | /// </summary> |
217 | /// <param name="pack"></param> | 235 | /// <param name="pack"></param> |
218 | public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) | 236 | public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) |
219 | { | 237 | { |
220 | if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS) != 0) | 238 | int i = 0; |
239 | bool update_movementflag = false; | ||
240 | bool update_rotation = false; | ||
241 | bool DCFlagKeyPressed = false; | ||
242 | 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); | ||
244 | |||
245 | this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); | ||
246 | |||
247 | if (q != this.bodyRot) | ||
221 | { | 248 | { |
222 | Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); | 249 | this.bodyRot = q; |
223 | if (((movementflag & 1) == 0) || (q != this.bodyRot)) | 250 | update_rotation = true; |
224 | { | ||
225 | Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(1, 0, 0); | ||
226 | this.AddNewMovement(v3, q); | ||
227 | movementflag = 1; | ||
228 | this.bodyRot = q; | ||
229 | } | ||
230 | } | 251 | } |
231 | else if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG) != 0) | 252 | foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof(Dir_ControlFlags))) |
232 | { | 253 | { |
233 | Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); | 254 | if ((flags & (uint)DCF) != 0) |
234 | if (((movementflag & 2) == 0) || (q != this.bodyRot)) | 255 | { |
235 | { | 256 | DCFlagKeyPressed = true; |
236 | Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(-1, 0, 0); | 257 | agent_control_v3 += Dir_Vectors[i]; |
237 | this.AddNewMovement(v3, q); | 258 | if ((movementflag & (uint)DCF) == 0) |
238 | movementflag = 2; | 259 | { |
239 | this.bodyRot = q; | 260 | movementflag += (byte)(uint)DCF; |
261 | update_movementflag = true; | ||
262 | } | ||
240 | } | 263 | } |
241 | } | 264 | else |
242 | else | ||
243 | { | ||
244 | if ((movementflag) != 0) | ||
245 | { | 265 | { |
246 | NewForce newVelocity = new NewForce(); | 266 | if ((movementflag & (uint)DCF) != 0) |
247 | newVelocity.X = 0; | 267 | { |
248 | newVelocity.Y = 0; | 268 | movementflag -= (byte)(uint)DCF; |
249 | newVelocity.Z = 0; | 269 | update_movementflag = true; |
250 | this.forcesList.Add(newVelocity); | 270 | } |
251 | movementflag = 0; | ||
252 | } | 271 | } |
272 | i++; | ||
273 | } | ||
274 | if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) | ||
275 | { | ||
276 | this.AddNewMovement(agent_control_v3, q); | ||
253 | } | 277 | } |
254 | 278 | ||
255 | } | 279 | } |
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs index 870303f..a232b65 100644 --- a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs | |||
@@ -34,7 +34,7 @@ using System.CodeDom; | |||
34 | using System.CodeDom.Compiler; | 34 | using System.CodeDom.Compiler; |
35 | using Microsoft.CSharp; | 35 | using Microsoft.CSharp; |
36 | 36 | ||
37 | namespace OpenSim.Scripting | 37 | namespace OpenSim.Region.Enviorment.Scripting |
38 | { | 38 | { |
39 | public class CSharpScriptEngine : IScriptCompiler | 39 | public class CSharpScriptEngine : IScriptCompiler |
40 | { | 40 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs index ffae1d7..2d44223 100644 --- a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs | |||
@@ -34,7 +34,7 @@ using System.CodeDom; | |||
34 | using System.CodeDom.Compiler; | 34 | using System.CodeDom.Compiler; |
35 | using Microsoft.JScript; | 35 | using Microsoft.JScript; |
36 | 36 | ||
37 | namespace OpenSim.Scripting | 37 | namespace OpenSim.Region.Enviorment.Scripting |
38 | { | 38 | { |
39 | public class JScriptEngine : IScriptCompiler | 39 | public class JScriptEngine : IScriptCompiler |
40 | { | 40 | { |
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs index 56bd1db..1e64675 100644 --- a/OpenSim/OpenSim.Region/Scenes/scripting/Script.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs | |||
@@ -31,10 +31,10 @@ using System.Text; | |||
31 | 31 | ||
32 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region; | 34 | using OpenSim.Region.Environment; |
35 | using OpenSim.Region.Scenes; | 35 | using OpenSim.Region.Environment.Scenes; |
36 | 36 | ||
37 | namespace OpenSim.Scripting | 37 | namespace OpenSim.Region.Enviorment.Scripting |
38 | { | 38 | { |
39 | public interface IScript | 39 | public interface IScript |
40 | { | 40 | { |
@@ -54,7 +54,7 @@ namespace OpenSim.Scripting | |||
54 | public void Initialise(ScriptInfo scriptInfo) | 54 | public void Initialise(ScriptInfo scriptInfo) |
55 | { | 55 | { |
56 | script = scriptInfo; | 56 | script = scriptInfo; |
57 | script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame); | 57 | script.events.OnFrame += new OpenSim.Region.Environment.Scenes.EventManager.OnFrameDelegate(events_OnFrame); |
58 | script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); | 58 | script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index cf627dd..522a572 100644 --- a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs | |||
@@ -29,10 +29,10 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | 31 | ||
32 | using OpenSim.Region.Scenes; | 32 | using OpenSim.Region.Environment.Scenes; |
33 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
34 | 34 | ||
35 | namespace OpenSim.Scripting | 35 | namespace OpenSim.Region.Enviorment.Scripting |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Class which provides access to the world | 38 | /// Class which provides access to the world |
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs index abffffa..eb1c1d9 100644 --- a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs | |||
@@ -29,12 +29,12 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | 31 | ||
32 | namespace OpenSim.Scripting | 32 | namespace 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.Scenes.Scene scene; | 37 | OpenSim.Region.Environment.Scenes.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) |
@@ -49,7 +49,7 @@ namespace OpenSim.Scripting | |||
49 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); | 49 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); |
50 | } | 50 | } |
51 | 51 | ||
52 | public ScriptManager(OpenSim.Region.Scenes.Scene world) | 52 | public ScriptManager(OpenSim.Region.Environment.Scenes.Scene world) |
53 | { | 53 | { |
54 | scene = world; | 54 | scene = world; |
55 | 55 | ||
@@ -59,9 +59,6 @@ namespace OpenSim.Scripting | |||
59 | 59 | ||
60 | JScriptEngine jscriptCompiler = new JScriptEngine(); | 60 | JScriptEngine jscriptCompiler = new JScriptEngine(); |
61 | compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); | 61 | compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); |
62 | |||
63 | JSharpScriptEngine jsharpCompiler = new JSharpScriptEngine(); | ||
64 | compilers.Add(jsharpCompiler.FileExt(), jsharpCompiler); | ||
65 | } | 62 | } |
66 | 63 | ||
67 | public void Compile(string filename) | 64 | public void Compile(string filename) |