aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-08-28 03:51:20 +0100
committerUbitUmarov2016-08-28 03:51:20 +0100
commit804d4971e236a0e75a51358f3d9c43313d140e5f (patch)
tree8ff7a27cfea2af211cdfa7f0f06ff55c3a7da7d7 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentreduce math on use of camerarotation (need to add a lock there). Fix a bug o... (diff)
downloadopensim-SC_OLD-804d4971e236a0e75a51358f3d9c43313d140e5f.zip
opensim-SC_OLD-804d4971e236a0e75a51358f3d9c43313d140e5f.tar.gz
opensim-SC_OLD-804d4971e236a0e75a51358f3d9c43313d140e5f.tar.bz2
opensim-SC_OLD-804d4971e236a0e75a51358f3d9c43313d140e5f.tar.xz
my broken version of vehicle mouse steer on ubOde (no bank,needs better damp)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs30
1 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index bf78c3f..f7f1835 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2162,9 +2162,19 @@ namespace OpenSim.Region.Framework.Scenes
2162 { 2162 {
2163 AddToPhysics(isPhysical, isPhantom, building, isPhysical); 2163 AddToPhysics(isPhysical, isPhantom, building, isPhysical);
2164 UpdatePhysicsSubscribedEvents(); // not sure if appliable here 2164 UpdatePhysicsSubscribedEvents(); // not sure if appliable here
2165 if(!_VolumeDetectActive &&
2166 m_vehicleParams != null &&
2167 m_vehicleParams.CameraDecoupled &&
2168 m_localId == ParentGroup.RootPart.LocalId)
2169 AddFlag(PrimFlags.CameraDecoupled);
2170 else
2171 RemFlag(PrimFlags.CameraDecoupled);
2165 } 2172 }
2166 else 2173 else
2174 {
2167 PhysActor = null; // just to be sure 2175 PhysActor = null; // just to be sure
2176 RemFlag(PrimFlags.CameraDecoupled);
2177 }
2168 } 2178 }
2169 } 2179 }
2170 2180
@@ -3539,6 +3549,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3539 set 3549 set
3540 { 3550 {
3541 m_vehicleParams = value; 3551 m_vehicleParams = value;
3552
3542 } 3553 }
3543 } 3554 }
3544 3555
@@ -3583,7 +3594,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3583 3594
3584 m_vehicleParams.ProcessVehicleFlags(param, remove); 3595 m_vehicleParams.ProcessVehicleFlags(param, remove);
3585 3596
3586 if (_parentID ==0 && PhysActor != null) 3597 if (_parentID == 0 && PhysActor != null)
3587 { 3598 {
3588 PhysActor.VehicleFlags(param, remove); 3599 PhysActor.VehicleFlags(param, remove);
3589 } 3600 }
@@ -4662,6 +4673,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4662 4673
4663 if (ParentGroup != null) 4674 if (ParentGroup != null)
4664 { 4675 {
4676 if(UsePhysics && !SetPhantom && m_localId == ParentGroup.RootPart.LocalId &&
4677 m_vehicleParams != null && m_vehicleParams.CameraDecoupled)
4678 AddFlag(PrimFlags.CameraDecoupled);
4679 else
4680 RemFlag(PrimFlags.CameraDecoupled);
4665 ParentGroup.HasGroupChanged = true; 4681 ParentGroup.HasGroupChanged = true;
4666 ScheduleFullUpdate(); 4682 ScheduleFullUpdate();
4667 } 4683 }
@@ -4722,9 +4738,16 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4722 if (VolumeDetectActive) // change if not the default only 4738 if (VolumeDetectActive) // change if not the default only
4723 pa.SetVolumeDetect(1); 4739 pa.SetVolumeDetect(1);
4724 4740
4725 if (m_vehicleParams != null && LocalId == ParentGroup.RootPart.LocalId) 4741 if (m_vehicleParams != null && m_localId == ParentGroup.RootPart.LocalId)
4742 {
4726 m_vehicleParams.SetVehicle(pa); 4743 m_vehicleParams.SetVehicle(pa);
4727 4744 if(isPhysical && !isPhantom && m_vehicleParams.CameraDecoupled)
4745 AddFlag(PrimFlags.CameraDecoupled);
4746 else
4747 RemFlag(PrimFlags.CameraDecoupled);
4748 }
4749 else
4750 RemFlag(PrimFlags.CameraDecoupled);
4728 // we are going to tell rest of code about physics so better have this here 4751 // we are going to tell rest of code about physics so better have this here
4729 PhysActor = pa; 4752 PhysActor = pa;
4730 4753
@@ -4800,6 +4823,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4800 4823
4801 ParentGroup.Scene.EventManager.TriggerObjectRemovedFromPhysicalScene(this); 4824 ParentGroup.Scene.EventManager.TriggerObjectRemovedFromPhysicalScene(this);
4802 } 4825 }
4826 RemFlag(PrimFlags.CameraDecoupled);
4803 PhysActor = null; 4827 PhysActor = null;
4804 } 4828 }
4805 4829