found core hack to fix modules interdependencies RegionLoaded is not that obvius
parent
8571736ff3
commit
e1a8125b4f
|
@ -78,10 +78,19 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled || m_scene == null)
|
||||
return;
|
||||
|
||||
m_scene.Dispose();
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (!m_Enabled || m_scene == null)
|
||||
return;
|
||||
|
||||
m_scene.RegionLoaded();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -325,6 +325,8 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
}
|
||||
*/
|
||||
|
||||
IConfig physicsconfig = null;
|
||||
|
||||
public ODEScene(Scene pscene, IConfigSource psourceconfig, string pname, bool podeUbitLib)
|
||||
{
|
||||
OdeLock = new Object();
|
||||
|
@ -336,13 +338,6 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
m_odeUbitLib = podeUbitLib;
|
||||
m_frameWorkScene = pscene;
|
||||
|
||||
mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
|
||||
if (mesher == null)
|
||||
{
|
||||
m_log.WarnFormat("[UbitODE] No mesher. module disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
m_frameWorkScene.RegisterModuleInterface<PhysicsScene>(this);
|
||||
|
||||
Initialization();
|
||||
|
@ -350,11 +345,22 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
base.Initialise(m_frameWorkScene.PhysicsRequestAsset,
|
||||
(m_frameWorkScene.Heightmap != null ? m_frameWorkScene.Heightmap.GetFloatsSerialised() : new float[m_frameWorkScene.RegionInfo.RegionSizeX * m_frameWorkScene.RegionInfo.RegionSizeY]),
|
||||
(float)m_frameWorkScene.RegionInfo.RegionSettings.WaterHeight);
|
||||
|
||||
|
||||
m_frameWorkScene.PhysicsEnabled = true;
|
||||
}
|
||||
|
||||
// core hack this just means all modules where loaded
|
||||
// so now we can look for dependencies
|
||||
public void RegionLoaded()
|
||||
{
|
||||
mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
|
||||
if (mesher == null)
|
||||
{
|
||||
m_log.WarnFormat("[UbitODE] No mesher. module disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
|
||||
m_frameWorkScene.PhysicsEnabled = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Initiailizes the scene
|
||||
/// Sets many properties that ODE requires to be stable
|
||||
|
@ -454,7 +460,7 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
|
||||
int contactsPerCollision = 80;
|
||||
|
||||
IConfig physicsconfig = null;
|
||||
physicsconfig = null;
|
||||
|
||||
if (m_config != null)
|
||||
{
|
||||
|
@ -505,8 +511,6 @@ namespace OpenSim.Region.PhysicsModule.UbitOde
|
|||
d.WorldSetContactSurfaceLayer(world, contactsurfacelayer);
|
||||
d.WorldSetContactMaxCorrectingVel(world, 60.0f);
|
||||
|
||||
m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
|
||||
|
||||
HalfOdeStep = ODE_STEPSIZE * 0.5f;
|
||||
odetimestepMS = (int)(1000.0f * ODE_STEPSIZE + 0.5f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue