fix turning off phanton always decreasing number of physical parts
parent
909572ed86
commit
c8f7cd60cd
|
@ -4496,6 +4496,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (pa != null)
|
if (pa != null)
|
||||||
{
|
{
|
||||||
|
if(wasUsingPhysics)
|
||||||
ParentGroup.Scene.RemovePhysicalPrim(1);
|
ParentGroup.Scene.RemovePhysicalPrim(1);
|
||||||
RemoveFromPhysics();
|
RemoveFromPhysics();
|
||||||
}
|
}
|
||||||
|
@ -4513,16 +4514,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
AddToPhysics(UsePhysics, SetPhantom, building, false);
|
AddToPhysics(UsePhysics, SetPhantom, building, false);
|
||||||
pa = PhysActor;
|
pa = PhysActor;
|
||||||
/*
|
/*
|
||||||
if (pa != null)
|
if (pa != null)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
// ((AggregateScriptEvents & scriptEvents.collision) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.collision) != 0) ||
|
||||||
// ((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
|
||||||
// ((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
|
||||||
// ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) ||
|
||||||
// ((AggregateScriptEvents & scriptEvents.land_collision) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.land_collision) != 0) ||
|
||||||
// ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) ||
|
// ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) ||
|
||||||
((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) ||
|
((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) ||
|
||||||
((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) ||
|
((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) ||
|
||||||
(CollisionSound != UUID.Zero)
|
(CollisionSound != UUID.Zero)
|
||||||
|
@ -4532,19 +4533,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
pa.SubscribeEvents(1000);
|
pa.SubscribeEvents(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else // it already has a physical representation
|
else // it already has a physical representation
|
||||||
{
|
{
|
||||||
DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status.
|
DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status.
|
||||||
/* moved into DoPhysicsPropertyUpdate
|
/* moved into DoPhysicsPropertyUpdate
|
||||||
if(VolumeDetectActive)
|
if(VolumeDetectActive)
|
||||||
pa.SetVolumeDetect(1);
|
pa.SetVolumeDetect(1);
|
||||||
else
|
else
|
||||||
pa.SetVolumeDetect(0);
|
pa.SetVolumeDetect(0);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (pa.Building != building)
|
if (pa.Building != building)
|
||||||
pa.Building = building;
|
pa.Building = building;
|
||||||
|
|
Loading…
Reference in New Issue