* Fixed neighbour range bug

* Various refactorings
afrisby
lbsa71 2007-11-29 15:27:57 +00:00
parent 4bd38fc65a
commit 7704bb6f63
9 changed files with 57 additions and 58 deletions

View File

@ -115,8 +115,8 @@ namespace OpenSim.Region.ClientStack
scene.LoadWorldMap(); scene.LoadWorldMap();
scene.RegisterRegionWithGrid(); scene.RegisterRegionWithGrid();
scene.PhysScene = GetPhysicsScene(); scene.PhysicsScene = GetPhysicsScene();
scene.PhysScene.SetTerrain(scene.Terrain.GetHeights1D()); scene.PhysicsScene.SetTerrain(scene.Terrain.GetHeights1D());
//Master Avatar Setup //Master Avatar Setup
UserProfileData masterAvatar; UserProfileData masterAvatar;

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
public PhysicsScene PhyScene public PhysicsScene PhysicsScene
{ {
get get
{ return _PhyScene; } { return _PhyScene; }

View File

@ -429,7 +429,7 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart rootPart = (group).GetChildPart(group.UUID); SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
if (rootPart.PhysActor != null) if (rootPart.PhysActor != null)
{ {
phyScene.RemovePrim(rootPart.PhysActor); PhysicsScene.RemovePrim(rootPart.PhysActor);
rootPart.PhysActor = null; rootPart.PhysActor = null;
} }
@ -482,7 +482,7 @@ namespace OpenSim.Region.Environment.Scenes
if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
{ {
PrimitiveBaseShape pbs = rootPart.Shape; PrimitiveBaseShape pbs = rootPart.Shape;
rootPart.PhysActor = phyScene.AddPrimShape( rootPart.PhysActor = PhysicsScene.AddPrimShape(
rootPart.Name, rootPart.Name,
pbs, pbs,
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,

View File

@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
public bool m_physicalPrim; public bool m_physicalPrim;
public bool m_sendTasksToChild; public bool m_sendTasksToChild;
private int m_RestartTimerCounter; private int m_RestartTimerCounter;
private Timer t_restartTimer = new Timer(15000); // Wait before firing private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
private int m_incrementsof15seconds = 0; private int m_incrementsof15seconds = 0;
protected ModuleLoader m_moduleLoader; protected ModuleLoader m_moduleLoader;
@ -137,16 +137,10 @@ namespace OpenSim.Region.Environment.Scenes
private readonly EstateManager m_estateManager; private readonly EstateManager m_estateManager;
private PhysicsScene phyScene public PhysicsScene PhysicsScene
{ {
set { m_innerScene.PhyScene = value; } set { m_innerScene.PhysicsScene = value; }
get { return (m_innerScene.PhyScene); } get { return (m_innerScene.PhysicsScene); }
}
public PhysicsScene PhysScene
{
set { m_innerScene.PhyScene = value; }
get { return (m_innerScene.PhyScene); }
} }
public object SyncRoot public object SyncRoot
@ -239,7 +233,7 @@ namespace OpenSim.Region.Environment.Scenes
// //
// Out of memory // Out of memory
// Operating system has killed the plugin // Operating system has killed the plugin
m_innerScene.UnRecoverableError += restartNOW; m_innerScene.UnRecoverableError += RestartNow;
m_sceneXmlLoader = new SceneXmlLoader(this, m_innerScene, m_regInfo); m_sceneXmlLoader = new SceneXmlLoader(this, m_innerScene, m_regInfo);
@ -275,9 +269,10 @@ namespace OpenSim.Region.Environment.Scenes
{ {
// Another region is up. We have to tell all our ScenePresences about it // Another region is up. We have to tell all our ScenePresences about it
// This fails to get the desired effect and needs further work. // This fails to get the desired effect and needs further work.
if (RegionInfo.RegionHandle != otherRegion.RegionHandle) if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
{ {
if (Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1 || Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1) if ((Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1) && (Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1))
{ {
if (!(m_regionRestartNotifyList.Contains(otherRegion))) if (!(m_regionRestartNotifyList.Contains(otherRegion)))
{ {
@ -285,7 +280,7 @@ namespace OpenSim.Region.Environment.Scenes
m_restartWaitTimer.Interval= 50000; m_restartWaitTimer.Interval= 50000;
m_restartWaitTimer.AutoReset = false; m_restartWaitTimer.AutoReset = false;
m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); m_restartWaitTimer.Elapsed += new ElapsedEventHandler(RestartNotifyWaitElapsed);
m_restartWaitTimer.Start(); m_restartWaitTimer.Start();
} }
} }
@ -302,25 +297,25 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (seconds < 15) if (seconds < 15)
{ {
t_restartTimer.Stop(); m_restartTimer.Stop();
SendGeneralAlert("Restart Aborted"); SendGeneralAlert("Restart Aborted");
} }
else else
{ {
t_restartTimer.Interval = 15000; m_restartTimer.Interval = 15000;
m_incrementsof15seconds = (int) seconds/15; m_incrementsof15seconds = (int) seconds/15;
m_RestartTimerCounter = 0; m_RestartTimerCounter = 0;
t_restartTimer.AutoReset = true; m_restartTimer.AutoReset = true;
t_restartTimer.Elapsed += new ElapsedEventHandler(restartTimer_Elapsed); m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds / 60) + " minutes"); MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds / 60) + " minutes");
t_restartTimer.Start(); m_restartTimer.Start();
SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
} }
} }
public void restartTimer_Elapsed(object sender, ElapsedEventArgs e) public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e)
{ {
m_RestartTimerCounter++; m_RestartTimerCounter++;
if (m_RestartTimerCounter <= m_incrementsof15seconds) if (m_RestartTimerCounter <= m_incrementsof15seconds)
@ -330,14 +325,14 @@ namespace OpenSim.Region.Environment.Scenes
} }
else else
{ {
t_restartTimer.Stop(); m_restartTimer.Stop();
t_restartTimer.AutoReset = false; m_restartTimer.AutoReset = false;
restartNOW(); RestartNow();
} }
} }
public void restartNOW() public void RestartNow()
{ {
MainLog.Instance.Error("REGION", "Closing"); MainLog.Instance.Error("REGION", "Closing");
Close(); Close();
@ -345,7 +340,7 @@ namespace OpenSim.Region.Environment.Scenes
base.Restart(0); base.Restart(0);
} }
public void restart_Notify_Wait_Elapsed(object sender, ElapsedEventArgs e) public void RestartNotifyWaitElapsed(object sender, ElapsedEventArgs e)
{ {
m_restartWaitTimer.Stop(); m_restartWaitTimer.Stop();
foreach (RegionInfo region in m_regionRestartNotifyList) foreach (RegionInfo region in m_regionRestartNotifyList)
@ -551,7 +546,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
lock (SyncRoot) lock (SyncRoot)
{ {
phyScene.SetTerrain(Terrain.GetHeights1D()); PhysicsScene.SetTerrain(Terrain.GetHeights1D());
} }
m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
@ -748,7 +743,7 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); SceneObjectPart rootPart = prim.GetChildPart(prim.UUID);
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim);
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
rootPart.PhysActor = phyScene.AddPrimShape( rootPart.PhysActor = PhysicsScene.AddPrimShape(
rootPart.Name, rootPart.Name,
rootPart.Shape, rootPart.Shape,
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
@ -852,7 +847,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
rootPart.PhysActor = rootPart.PhysActor =
phyScene.AddPrimShape( PhysicsScene.AddPrimShape(
rootPart.Name, rootPart.Name,
rootPart.Shape, rootPart.Shape,
new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(pos.X, pos.Y, pos.Z),

View File

@ -93,12 +93,12 @@ namespace OpenSim.Region.Environment.Scenes
public void Add(Scene scene) public void Add(Scene scene)
{ {
scene.OnRestart += handleRestart; scene.OnRestart += HandleRestart;
m_localScenes.Add(scene); m_localScenes.Add(scene);
} }
public void handleRestart(RegionInfo rdata) public void HandleRestart(RegionInfo rdata)
{ {
MainLog.Instance.Error("SCENEMANAGER", "Got Restart message for region:" + rdata.RegionName +" Sending up to main"); MainLog.Instance.Error("SCENEMANAGER", "Got Restart message for region:" + rdata.RegionName +" Sending up to main");
int RegionSceneElement = -1; int RegionSceneElement = -1;
@ -106,14 +106,18 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (rdata.RegionName == m_localScenes[i].RegionInfo.RegionName) if (rdata.RegionName == m_localScenes[i].RegionInfo.RegionName)
{
RegionSceneElement = i; RegionSceneElement = i;
}
} }
// Now we make sure the region is no longer known about by the SceneManager // Now we make sure the region is no longer known about by the SceneManager
// Prevents Duplicates. // Prevents Duplicates.
if (RegionSceneElement >= 0) if (RegionSceneElement >= 0)
{
m_localScenes.RemoveAt(RegionSceneElement); m_localScenes.RemoveAt(RegionSceneElement);
}
// Send signal to main that we're restarting this sim. // Send signal to main that we're restarting this sim.
OnReStartSim(rdata); OnReStartSim(rdata);
@ -216,7 +220,7 @@ namespace OpenSim.Region.Environment.Scenes
public void RestartCurrentScene() public void RestartCurrentScene()
{ {
ForEachCurrentScene(delegate(Scene scene) { scene.restartNOW(); }); ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); });
} }

View File

@ -150,7 +150,7 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.PhysActor.Position = m_rootPart.PhysActor.Position =
new PhysicsVector(m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y, new PhysicsVector(m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y,
m_rootPart.GroupPosition.Z); m_rootPart.GroupPosition.Z);
m_scene.PhysScene.AddPhysicsActorTaint(m_rootPart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
} }
} }
} }
@ -515,7 +515,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
PrimitiveBaseShape pbs = dupe.RootPart.Shape; PrimitiveBaseShape pbs = dupe.RootPart.Shape;
dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrimShape( dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
dupe.RootPart.Name, dupe.RootPart.Name,
pbs, pbs,
new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y,
@ -827,7 +827,7 @@ namespace OpenSim.Region.Environment.Scenes
if (linkPart.PhysActor != null) if (linkPart.PhysActor != null)
{ {
m_scene.PhysScene.RemovePrim(linkPart.PhysActor); m_scene.PhysicsScene.RemovePrim(linkPart.PhysActor);
linkPart.PhysActor = null; linkPart.PhysActor = null;
} }
@ -897,7 +897,7 @@ namespace OpenSim.Region.Environment.Scenes
// SceneObjectPart.UpdatePrimFlags() // SceneObjectPart.UpdatePrimFlags()
if (m_rootPart.PhysActor != null) if (m_rootPart.PhysActor != null)
{ {
linkPart.PhysActor = m_scene.PhysScene.AddPrimShape( linkPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
linkPart.Name, linkPart.Name,
linkPart.Shape, linkPart.Shape,
new PhysicsVector(linkPart.AbsolutePosition.X, linkPart.AbsolutePosition.Y, new PhysicsVector(linkPart.AbsolutePosition.X, linkPart.AbsolutePosition.Y,
@ -1205,8 +1205,8 @@ namespace OpenSim.Region.Environment.Scenes
} }
if (m_rootPart.PhysActor != null) if (m_rootPart.PhysActor != null)
{ {
m_scene.PhysScene.RemovePrim(m_rootPart.PhysActor); m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
m_rootPart.PhysActor = m_scene.PhysScene.AddPrimShape( m_rootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
m_rootPart.Name, m_rootPart.Name,
m_rootPart.Shape, m_rootPart.Shape,
new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y, new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y,
@ -1242,7 +1242,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
m_rootPart.PhysActor.Size = m_rootPart.PhysActor.Size =
new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z); new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z);
m_scene.PhysScene.AddPhysicsActorTaint(m_rootPart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
} }
} }
} }
@ -1333,7 +1333,7 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.PhysActor.Orientation = m_rootPart.PhysActor.Orientation =
new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
m_rootPart.RotationOffset.Z); m_rootPart.RotationOffset.Z);
m_scene.PhysScene.AddPhysicsActorTaint(m_rootPart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
} }
ScheduleGroupForTerseUpdate(); ScheduleGroupForTerseUpdate();
} }
@ -1351,7 +1351,7 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.PhysActor.Orientation = m_rootPart.PhysActor.Orientation =
new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
m_rootPart.RotationOffset.Z); m_rootPart.RotationOffset.Z);
m_scene.PhysScene.AddPhysicsActorTaint(m_rootPart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
} }
AbsolutePosition = pos; AbsolutePosition = pos;
ScheduleGroupForTerseUpdate(); ScheduleGroupForTerseUpdate();
@ -1395,7 +1395,7 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.PhysActor.Orientation = m_rootPart.PhysActor.Orientation =
new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
m_rootPart.RotationOffset.Z); m_rootPart.RotationOffset.Z);
m_scene.PhysScene.AddPhysicsActorTaint(m_rootPart.PhysActor); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
} }
foreach (SceneObjectPart prim in m_parts.Values) foreach (SceneObjectPart prim in m_parts.Values)

View File

@ -173,7 +173,7 @@ namespace OpenSim.Region.Environment.Scenes
//lock (m_parentGroup.m_scene.SyncRoot) //lock (m_parentGroup.m_scene.SyncRoot)
//{ //{
PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z); PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
m_parentGroup.m_scene.PhysScene.AddPhysicsActorTaint(PhysActor); m_parentGroup.m_scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
//} //}
} }
catch (Exception e) catch (Exception e)
@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Scenes
//lock (m_scene.SyncRoot) //lock (m_scene.SyncRoot)
//{ //{
PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z);
m_parentGroup.m_scene.PhysScene.AddPhysicsActorTaint(PhysActor); m_parentGroup.m_scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
//} //}
} }
catch (Exception ex) catch (Exception ex)
@ -961,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes
AddFlag(LLObject.ObjectFlags.Phantom); AddFlag(LLObject.ObjectFlags.Phantom);
if (PhysActor != null) if (PhysActor != null)
{ {
m_parentGroup.m_scene.PhysScene.RemovePrim(PhysActor); m_parentGroup.m_scene.PhysicsScene.RemovePrim(PhysActor);
/// that's not wholesome. Had to make m_scene public /// that's not wholesome. Had to make m_scene public
PhysActor = null; PhysActor = null;
} }
@ -971,7 +971,7 @@ namespace OpenSim.Region.Environment.Scenes
RemFlag(LLObject.ObjectFlags.Phantom); RemFlag(LLObject.ObjectFlags.Phantom);
if (PhysActor == null) if (PhysActor == null)
{ {
PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape( PhysActor = m_parentGroup.m_scene.PhysicsScene.AddPrimShape(
Name, Name,
Shape, Shape,
new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
@ -1015,14 +1015,14 @@ namespace OpenSim.Region.Environment.Scenes
PhysActor.IsPhysical = UsePhysics; PhysActor.IsPhysical = UsePhysics;
// If we're not what we're supposed to be in the physics scene, recreate ourselves. // If we're not what we're supposed to be in the physics scene, recreate ourselves.
//m_parentGroup.m_scene.PhysScene.RemovePrim(PhysActor); //m_parentGroup.m_scene.PhysicsScene.RemovePrim(PhysActor);
/// that's not wholesome. Had to make m_scene public /// that's not wholesome. Had to make m_scene public
//PhysActor = null; //PhysActor = null;
if ((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) if ((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
{ {
//PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape( //PhysActor = m_parentGroup.m_scene.PhysicsScene.AddPrimShape(
//Name, //Name,
//Shape, //Shape,
//new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, //new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
@ -1037,7 +1037,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
} }
m_parentGroup.m_scene.PhysScene.AddPhysicsActorTaint(PhysActor); m_parentGroup.m_scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
} }
} }
@ -1293,7 +1293,7 @@ namespace OpenSim.Region.Environment.Scenes
OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds."); OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds.");
RemFlag(LLObject.ObjectFlags.Physics); RemFlag(LLObject.ObjectFlags.Physics);
doPhysicsPropertyUpdate(false,true); doPhysicsPropertyUpdate(false,true);
m_parentGroup.m_scene.PhysScene.AddPhysicsActorTaint(PhysActor); m_parentGroup.m_scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
} }

View File

@ -453,7 +453,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (PhysicsActor != null) if (PhysicsActor != null)
{ {
m_scene.PhysScene.RemoveAvatar(PhysicsActor); m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
PhysicsActor = null; PhysicsActor = null;
@ -1320,7 +1320,7 @@ namespace OpenSim.Region.Environment.Scenes
public void AddToPhysicalScene() public void AddToPhysicalScene()
{ {
PhysicsScene scene = m_scene.PhysScene; PhysicsScene scene = m_scene.PhysicsScene;
PhysicsVector pVec = PhysicsVector pVec =
new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
{ {
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape(
rootPart.Name, rootPart.Name,
rootPart.Shape, rootPart.Shape,
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Scenes
bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim);
if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
{ {
rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( rootPart.PhysActor = m_innerScene.PhysicsScene.AddPrimShape(
rootPart.Name, rootPart.Name,
rootPart.Shape, rootPart.Shape,
new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,