From 686f6a83319eaccd27f426eda82c020246566963 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Mon, 2 Jul 2007 08:03:11 +0000
Subject: * Fixed Issue #161 by using PhysicsScene.Null instead of
BasePhysicsScene * Hid NullPhysicsScene for great justice * Fixed broken Grid
build
---
OpenSim/Region/Examples/SimpleApp/Program.cs | 4 +-
OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj | 6 --
.../Region/Examples/SimpleApp/SimpleApp.exe.build | 1 -
OpenSim/Region/Physics/Manager/PhysicsManager.cs | 2 +-
OpenSim/Region/Physics/Manager/PhysicsScene.cs | 74 +++++++++++-----------
5 files changed, 40 insertions(+), 47 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index 8e9ad75..3d9dd0d 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -14,9 +14,9 @@ using OpenSim.Region.Caches;
using OpenSim.Framework.Communications;
using OpenSim.Region.Communications.Local;
using OpenSim.Region.ClientStack;
-using OpenSim.Region.Physics.BasicPhysicsPlugin;
using System.Net;
using libsecondlife.Packets;
+using OpenSim.Physics.Manager;
namespace SimpleApp
{
@@ -59,7 +59,7 @@ namespace SimpleApp
BaseHttpServer httpServer = new BaseHttpServer( internalEndPoint.Port );
MyWorld world = new MyWorld(packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer);
- world.PhysScene = new BasicScene();
+ world.PhysScene = PhysicsScene.Null;
udpServer.LocalWorld = world;
httpServer.AddXmlRPCHandler("login_to_simulator", communicationsManager.UserServices.XmlRpcLoginMethod );
diff --git a/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj b/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj
index d39d091..bb8dcc0 100644
--- a/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj
+++ b/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj
@@ -140,12 +140,6 @@
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
False
-
- OpenSim.Region.Physics.BasicPhysicsPlugin
- {15B4FEF3-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
OpenSim.Region.Physics.Manager
{F4FF31EB-0000-0000-0000-000000000000}
diff --git a/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build b/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build
index db44992..aab0826 100644
--- a/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build
+++ b/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build
@@ -31,7 +31,6 @@
-
diff --git a/OpenSim/Region/Physics/Manager/PhysicsManager.cs b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
index efccb36..0e28522 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Physics.Manager
{
if (String.IsNullOrEmpty(engineName))
{
- return new NullPhysicsScene();
+ return PhysicsScene.Null;
}
if(_plugins.ContainsKey(engineName))
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 0901c2f..3f22585 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -53,61 +53,61 @@ namespace OpenSim.Physics.Manager
public abstract void GetResults();
public abstract void SetTerrain(float[] heightMap);
-
+
public abstract void DeleteTerrain();
public abstract bool IsThreaded
{
get;
}
- }
- public class NullPhysicsScene : PhysicsScene
- {
- private static int m_workIndicator;
-
- public override PhysicsActor AddAvatar(PhysicsVector position)
+ private class NullPhysicsScene : PhysicsScene
{
- OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
- return PhysicsActor.Null;
- }
+ private static int m_workIndicator;
- public override void RemoveAvatar(PhysicsActor actor)
- {
+ public override PhysicsActor AddAvatar(PhysicsVector position)
+ {
+ OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
+ return PhysicsActor.Null;
+ }
- }
+ public override void RemoveAvatar(PhysicsActor actor)
+ {
- public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
- {
- OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : AddPrim({0},{1})", position, size);
- return PhysicsActor.Null;
- }
+ }
- public override void Simulate(float timeStep)
- {
- m_workIndicator = (m_workIndicator + 1) % 10;
+ public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
+ {
+ OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size);
+ return PhysicsActor.Null;
+ }
- //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString());
- }
+ public override void Simulate(float timeStep)
+ {
+ m_workIndicator = (m_workIndicator + 1) % 10;
- public override void GetResults()
- {
- OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : GetResults()");
- }
+ //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString());
+ }
- public override void SetTerrain(float[] heightMap)
- {
- OpenSim.Framework.Console.MainLog.Instance.Verbose( "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
- }
+ public override void GetResults()
+ {
+ OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : GetResults()");
+ }
- public override void DeleteTerrain()
- {
+ public override void SetTerrain(float[] heightMap)
+ {
+ OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
+ }
- }
+ public override void DeleteTerrain()
+ {
- public override bool IsThreaded
- {
- get { return false; }
+ }
+
+ public override bool IsThreaded
+ {
+ get { return false; }
+ }
}
}
}
--
cgit v1.1