aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-02-18 17:42:14 +0000
committerUbitUmarov2012-02-18 17:42:14 +0000
commit3aee642190add7045f78e522ae7b2221b3566f1e (patch)
treea390b28dce297bde43aa216332d217b2b28ea03a /OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
parent vehicle parameters do cross (i hope) on regions in same instance ( others ne... (diff)
downloadopensim-SC-3aee642190add7045f78e522ae7b2221b3566f1e.zip
opensim-SC-3aee642190add7045f78e522ae7b2221b3566f1e.tar.gz
opensim-SC-3aee642190add7045f78e522ae7b2221b3566f1e.tar.bz2
opensim-SC-3aee642190add7045f78e522ae7b2221b3566f1e.tar.xz
changed how vehicle data is stored and passed to physics. use unsafe in serializer, tried to control m_dupeInProgress
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs62
1 files changed, 60 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
index 6e28bfa..2306309 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
@@ -22,7 +22,8 @@
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 * Revised March 5th 2010 by Kitto Flora. ODEDynamics.cs 25 * Revised March 5th 2010 by Kitto Flora. ODEDynamics.cs
26 * Ubit 2012
26 * rolled into ODEPrim.cs 27 * rolled into ODEPrim.cs
27 */ 28 */
28 29
@@ -38,7 +39,6 @@ using Ode.NET;
38using OpenSim.Framework; 39using OpenSim.Framework;
39using OpenSim.Region.Physics.Manager; 40using OpenSim.Region.Physics.Manager;
40 41
41
42namespace OpenSim.Region.Physics.OdePlugin 42namespace OpenSim.Region.Physics.OdePlugin
43{ 43{
44 /// <summary> 44 /// <summary>
@@ -254,6 +254,61 @@ namespace OpenSim.Region.Physics.OdePlugin
254 private float m_verticalAttractionTimescale = 500f; // Timescale > 300 means no vert attractor. 254 private float m_verticalAttractionTimescale = 500f; // Timescale > 300 means no vert attractor.
255 255
256 SerialControl m_taintserial = null; 256 SerialControl m_taintserial = null;
257 object m_taintvehicledata = null;
258
259 public void DoSetVehicle()
260 {
261 VehicleData vd = (VehicleData)m_taintvehicledata;
262
263 m_type = vd.m_type;
264 m_flags = vd.m_flags;
265
266 // Linear properties
267 m_linearMotorDirection = vd.m_linearMotorDirection;
268 m_linearFrictionTimescale = vd.m_linearFrictionTimescale;
269 m_linearMotorDecayTimescale = vd.m_linearMotorDecayTimescale;
270 m_linearMotorTimescale = vd.m_linearMotorTimescale;
271// m_linearMotorOffset = vd.m_linearMotorOffset;
272
273 //Angular properties
274 m_angularMotorDirection = vd.m_angularMotorDirection;
275 m_angularMotorTimescale = vd.m_angularMotorTimescale;
276 m_angularMotorDecayTimescale = vd.m_angularMotorDecayTimescale;
277 m_angularFrictionTimescale = vd.m_angularFrictionTimescale;
278
279 //Deflection properties
280// m_angularDeflectionEfficiency = vd.m_angularDeflectionEfficiency;
281// m_angularDeflectionTimescale = vd.m_angularDeflectionTimescale;
282// m_linearDeflectionEfficiency = vd.m_linearDeflectionEfficiency;
283// m_linearDeflectionTimescale = vd.m_linearDeflectionTimescale;
284
285 //Banking properties
286// m_bankingEfficiency = vd.m_bankingEfficiency;
287// m_bankingMix = vd.m_bankingMix;
288// m_bankingTimescale = vd.m_bankingTimescale;
289
290 //Hover and Buoyancy properties
291 m_VhoverHeight = vd.m_VhoverHeight;
292// m_VhoverEfficiency = vd.m_VhoverEfficiency;
293 m_VhoverTimescale = vd.m_VhoverTimescale;
294 m_VehicleBuoyancy = vd.m_VehicleBuoyancy;
295
296 //Attractor properties
297 m_verticalAttractionEfficiency = vd.m_verticalAttractionEfficiency;
298 m_verticalAttractionTimescale = vd.m_verticalAttractionTimescale;
299
300 // Axis
301// m_referenceFrame = vd.m_referenceFrame;
302
303
304 m_taintvehicledata = null;
305 }
306
307 public override void SetVehicle(object vdata)
308 {
309 m_taintvehicledata = vdata;
310 _parent_scene.AddPhysicsActorTaint(this);
311 }
257 312
258 public override byte[] Serialize(bool PhysIsRunning) 313 public override byte[] Serialize(bool PhysIsRunning)
259 { 314 {
@@ -1843,6 +1898,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1843 if (m_taintCollidesWater != m_collidesWater) 1898 if (m_taintCollidesWater != m_collidesWater)
1844 changefloatonwater(timestep); 1899 changefloatonwater(timestep);
1845 1900
1901 if (m_taintvehicledata != null)
1902 DoSetVehicle();
1903
1846 if (m_taintserial != null) 1904 if (m_taintserial != null)
1847 DoSerialize(m_taintserial); 1905 DoSerialize(m_taintserial);
1848 1906