Make it possible to force all prims to be phantom via the collidable_prim boolean setting in the OpenSim.ini config [Startup] section.
Naturally, default is true. When set to false, "phantom" flags on prims can be set as usual but all prims remain phantom. This setting is for test purposes. This switch does not affect the collision of avatars with the terrain.iar_mods
parent
469955889e
commit
48113f0fc8
|
@ -79,6 +79,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool m_physicalPrim;
|
public bool m_physicalPrim;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether prims can be collided with.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// If this is set to false then prims cannot be subject to physics either.
|
||||||
|
/// </summary>
|
||||||
|
public bool CollidablePrims { get; private set; }
|
||||||
|
|
||||||
public float m_maxNonphys = 256;
|
public float m_maxNonphys = 256;
|
||||||
public float m_maxPhys = 10;
|
public float m_maxPhys = 10;
|
||||||
public bool m_clampPrimSize;
|
public bool m_clampPrimSize;
|
||||||
|
@ -651,6 +659,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
|
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
|
||||||
|
|
||||||
m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
|
m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
|
||||||
|
CollidablePrims = startupConfig.GetBoolean("collidable_prim", true);
|
||||||
|
|
||||||
m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
|
m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
|
||||||
if (RegionInfo.NonphysPrimMax > 0)
|
if (RegionInfo.NonphysPrimMax > 0)
|
||||||
|
|
|
@ -1473,6 +1473,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="VolumeDetectActive"></param>
|
/// <param name="VolumeDetectActive"></param>
|
||||||
public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive)
|
public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive)
|
||||||
{
|
{
|
||||||
|
if (!ParentGroup.Scene.CollidablePrims)
|
||||||
|
return;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Applying physics to {0} {1}, m_physicalPrim {2}",
|
// "[SCENE OBJECT PART]: Applying physics to {0} {1}, m_physicalPrim {2}",
|
||||||
// Name, LocalId, UUID, m_physicalPrim);
|
// Name, LocalId, UUID, m_physicalPrim);
|
||||||
|
@ -4318,7 +4321,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup.Scene == null)
|
if (ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PhysActor == null)
|
if (ParentGroup.Scene.CollidablePrims && PhysActor == null)
|
||||||
{
|
{
|
||||||
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
|
// It's not phantom anymore. So make sure the physics engine get's knowledge of it
|
||||||
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
|
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
|
||||||
|
|
|
@ -181,6 +181,11 @@
|
||||||
; ## PHYSICS
|
; ## PHYSICS
|
||||||
; ##
|
; ##
|
||||||
|
|
||||||
|
; If true then prims can be collided with by avatars, other prims, etc.
|
||||||
|
; If false then all prims are phantom, no matter whether their phantom flag is checked or unchecked.
|
||||||
|
; Also, no prims are subject to physics.
|
||||||
|
collidable_prim = true
|
||||||
|
|
||||||
; If true then prims can be made subject to physics (gravity, pushing, etc.).
|
; If true then prims can be made subject to physics (gravity, pushing, etc.).
|
||||||
; If false then physics flag can be set but it is not honoured. However, prims are still solid for the purposes of collision direction
|
; If false then physics flag can be set but it is not honoured. However, prims are still solid for the purposes of collision direction
|
||||||
physical_prim = true
|
physical_prim = true
|
||||||
|
|
Loading…
Reference in New Issue