diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs (renamed from OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/POS/POSCharacter.cs (renamed from OpenSim/Region/Physics/POSPlugin/POSCharacter.cs) | 11 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/POS/POSPrim.cs (renamed from OpenSim/Region/Physics/POSPlugin/POSPrim.cs) | 5 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/POS/POSScene.cs (renamed from OpenSim/Region/Physics/POSPlugin/POSScene.cs) | 67 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs (renamed from OpenSim/Region/Physics/POSPlugin/POSPlugin.cs) | 40 |
5 files changed, 92 insertions, 37 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs index d07df02..e3a3e35 100644 --- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | using Mono.Addins; | ||
30 | 31 | ||
31 | // Information about this assembly is defined by the following | 32 | // Information about this assembly is defined by the following |
32 | // attributes. | 33 | // attributes. |
@@ -55,4 +56,7 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 56 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 57 | // numbers with the '*' character (the default): |
57 | 58 | ||
58 | [assembly : AssemblyVersion("0.7.5.*")] | 59 | [assembly : AssemblyVersion("0.8.2.*")] |
60 | |||
61 | [assembly: Addin("OpenSim.Region.PhysicsModule.POS", OpenSim.VersionInfo.VersionNumber)] | ||
62 | [assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] | ||
diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs index ae534ea..32469d9 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs | |||
@@ -30,9 +30,9 @@ using System.Collections.Generic; | |||
30 | using Nini.Config; | 30 | using Nini.Config; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Region.Physics.Manager; | 33 | using OpenSim.Region.PhysicsModules.SharedBase; |
34 | 34 | ||
35 | namespace OpenSim.Region.Physics.POSPlugin | 35 | namespace OpenSim.Region.PhysicsModule.POS |
36 | { | 36 | { |
37 | public class POSCharacter : PhysicsActor | 37 | public class POSCharacter : PhysicsActor |
38 | { | 38 | { |
@@ -273,9 +273,10 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
273 | set { return; } | 273 | set { return; } |
274 | } | 274 | } |
275 | 275 | ||
276 | public override bool PIDActive | 276 | public override bool PIDActive |
277 | { | 277 | { |
278 | set { return; } | 278 | get { return false; } |
279 | set { return; } | ||
279 | } | 280 | } |
280 | 281 | ||
281 | public override float PIDTau | 282 | public override float PIDTau |
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs index e4fd7eb..8aae716 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs | |||
@@ -30,9 +30,9 @@ using System.Collections.Generic; | |||
30 | using Nini.Config; | 30 | using Nini.Config; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Region.Physics.Manager; | 33 | using OpenSim.Region.PhysicsModules.SharedBase; |
34 | 34 | ||
35 | namespace OpenSim.Region.Physics.POSPlugin | 35 | namespace OpenSim.Region.PhysicsModule.POS |
36 | { | 36 | { |
37 | public class POSPrim : PhysicsActor | 37 | public class POSPrim : PhysicsActor |
38 | { | 38 | { |
@@ -270,6 +270,7 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
270 | 270 | ||
271 | public override bool PIDActive | 271 | public override bool PIDActive |
272 | { | 272 | { |
273 | get { return false; } | ||
273 | set { return; } | 274 | set { return; } |
274 | } | 275 | } |
275 | 276 | ||
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index 2f24a50..6375f18 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs | |||
@@ -29,34 +29,87 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using Nini.Config; | 30 | using Nini.Config; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using Mono.Addins; | ||
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
33 | using OpenSim.Region.Physics.Manager; | 34 | using OpenSim.Region.PhysicsModules.SharedBase; |
35 | using OpenSim.Region.Framework.Scenes; | ||
36 | using OpenSim.Region.Framework.Interfaces; | ||
34 | 37 | ||
35 | namespace OpenSim.Region.Physics.POSPlugin | 38 | namespace OpenSim.Region.PhysicsModule.POS |
36 | { | 39 | { |
37 | public class POSScene : PhysicsScene | 40 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "POSPhysicsScene")] |
41 | public class POSScene : PhysicsScene, INonSharedRegionModule | ||
38 | { | 42 | { |
39 | private List<POSCharacter> _characters = new List<POSCharacter>(); | 43 | private List<POSCharacter> _characters = new List<POSCharacter>(); |
40 | private List<POSPrim> _prims = new List<POSPrim>(); | 44 | private List<POSPrim> _prims = new List<POSPrim>(); |
41 | private float[] _heightMap; | 45 | private float[] _heightMap; |
42 | private const float gravity = -9.8f; | 46 | private const float gravity = -9.8f; |
43 | 47 | ||
48 | private bool m_Enabled = false; | ||
44 | //protected internal string sceneIdentifier; | 49 | //protected internal string sceneIdentifier; |
45 | 50 | ||
46 | public POSScene(String _sceneIdentifier) | 51 | #region INonSharedRegionModule |
52 | public string Name | ||
47 | { | 53 | { |
48 | //sceneIdentifier = _sceneIdentifier; | 54 | get { return "POS"; } |
49 | } | 55 | } |
50 | 56 | ||
51 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | 57 | public Type ReplaceableInterface |
52 | { | 58 | { |
59 | get { return null; } | ||
53 | } | 60 | } |
54 | 61 | ||
62 | public void Initialise(IConfigSource source) | ||
63 | { | ||
64 | // TODO: Move this out of Startup | ||
65 | IConfig config = source.Configs["Startup"]; | ||
66 | if (config != null) | ||
67 | { | ||
68 | string physics = config.GetString("physics", string.Empty); | ||
69 | if (physics == Name) | ||
70 | m_Enabled = true; | ||
71 | } | ||
72 | |||
73 | } | ||
74 | |||
75 | public void Close() | ||
76 | { | ||
77 | } | ||
78 | |||
79 | public void AddRegion(Scene scene) | ||
80 | { | ||
81 | if (!m_Enabled) | ||
82 | return; | ||
83 | |||
84 | EngineType = Name; | ||
85 | PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; | ||
86 | |||
87 | scene.RegisterModuleInterface<PhysicsScene>(this); | ||
88 | base.Initialise(scene.PhysicsRequestAsset, | ||
89 | (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), | ||
90 | (float)scene.RegionInfo.RegionSettings.WaterHeight); | ||
91 | |||
92 | } | ||
93 | |||
94 | public void RemoveRegion(Scene scene) | ||
95 | { | ||
96 | if (!m_Enabled) | ||
97 | return; | ||
98 | } | ||
99 | |||
100 | public void RegionLoaded(Scene scene) | ||
101 | { | ||
102 | if (!m_Enabled) | ||
103 | return; | ||
104 | } | ||
105 | #endregion | ||
106 | |||
55 | public override void Dispose() | 107 | public override void Dispose() |
56 | { | 108 | { |
57 | } | 109 | } |
58 | 110 | ||
59 | public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) | 111 | public override PhysicsActor AddAvatar( |
112 | string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) | ||
60 | { | 113 | { |
61 | POSCharacter act = new POSCharacter(); | 114 | POSCharacter act = new POSCharacter(); |
62 | act.Position = position; | 115 | act.Position = position; |
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs index e6b42e6..0d43781 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs | |||
@@ -25,40 +25,36 @@ | |||
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 | ||
28 | using OpenMetaverse; | ||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using Nini.Config; | 31 | using System.Linq; |
31 | using OpenSim.Framework; | 32 | using pCampBot.Interfaces; |
32 | using OpenSim.Region.Physics.Manager; | ||
33 | 33 | ||
34 | namespace OpenSim.Region.Physics.POSPlugin | 34 | namespace pCampBot |
35 | { | 35 | { |
36 | /// <summary> | 36 | /// <summary> |
37 | /// for now will be a very POS physics engine | 37 | /// Do nothing |
38 | /// </summary> | 38 | /// </summary> |
39 | public class POSPlugin : IPhysicsPlugin | 39 | public class NoneBehaviour : AbstractBehaviour |
40 | { | 40 | { |
41 | public POSPlugin() | 41 | public NoneBehaviour() |
42 | { | 42 | { |
43 | } | 43 | AbbreviatedName = "n"; |
44 | 44 | Name = "None"; | |
45 | public bool Init() | ||
46 | { | ||
47 | return true; | ||
48 | } | ||
49 | |||
50 | public PhysicsScene GetScene(string sceneIdentifier) | ||
51 | { | ||
52 | return new POSScene(sceneIdentifier); | ||
53 | } | 45 | } |
54 | 46 | ||
55 | public string GetName() | 47 | public override void Action() |
56 | { | 48 | { |
57 | return ("POS"); | 49 | Bot.Client.Self.Jump(false); |
50 | Bot.Client.Self.Movement.Stop = true; | ||
51 | m_interruptEvent.WaitOne(); | ||
52 | Bot.Client.Self.Movement.Stop = false; | ||
58 | } | 53 | } |
59 | 54 | ||
60 | public void Dispose() | 55 | public override void Interrupt() |
61 | { | 56 | { |
57 | m_interruptEvent.Set(); | ||
62 | } | 58 | } |
63 | } | 59 | } |
64 | } | 60 | } \ No newline at end of file |