diff options
author | Melanie | 2012-07-07 02:05:01 +0200 |
---|---|---|
committer | Melanie | 2012-07-07 02:05:01 +0200 |
commit | 6535f23e4b8fec9578dae5275db69b237a99e498 (patch) | |
tree | fcf5495a3ebc005812c377076def18d1bafa5bab /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | added llSetVelocity. will refuse to work on vehicles and on attachments ( th... (diff) | |
download | opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.zip opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.gz opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.bz2 opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.xz |
Add saving vehicle physics data to the database
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ed32adc..dd30a59 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
338 | private int LastColSoundSentTime; | 338 | private int LastColSoundSentTime; |
339 | 339 | ||
340 | 340 | ||
341 | private SOPVehicle m_vehicle = null; | 341 | private SOPVehicle m_vehicleParams = null; |
342 | 342 | ||
343 | private KeyframeMotion m_keyframeMotion = null; | 343 | private KeyframeMotion m_keyframeMotion = null; |
344 | 344 | ||
@@ -3379,15 +3379,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3379 | Force = force; | 3379 | Force = force; |
3380 | } | 3380 | } |
3381 | 3381 | ||
3382 | public SOPVehicle sopVehicle | 3382 | public SOPVehicle VehicleParams |
3383 | { | 3383 | { |
3384 | get | 3384 | get |
3385 | { | 3385 | { |
3386 | return m_vehicle; | 3386 | return m_vehicleParams; |
3387 | } | 3387 | } |
3388 | set | 3388 | set |
3389 | { | 3389 | { |
3390 | m_vehicle = value; | 3390 | m_vehicleParams = value; |
3391 | } | 3391 | } |
3392 | } | 3392 | } |
3393 | 3393 | ||
@@ -3396,10 +3396,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3396 | { | 3396 | { |
3397 | get | 3397 | get |
3398 | { | 3398 | { |
3399 | if (m_vehicle == null) | 3399 | if (m_vehicleParams == null) |
3400 | return (int)Vehicle.TYPE_NONE; | 3400 | return (int)Vehicle.TYPE_NONE; |
3401 | else | 3401 | else |
3402 | return (int)m_vehicle.Type; | 3402 | return (int)m_vehicleParams.Type; |
3403 | } | 3403 | } |
3404 | set | 3404 | set |
3405 | { | 3405 | { |
@@ -3409,7 +3409,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3409 | 3409 | ||
3410 | public void SetVehicleType(int type) | 3410 | public void SetVehicleType(int type) |
3411 | { | 3411 | { |
3412 | m_vehicle = null; | 3412 | m_vehicleParams = null; |
3413 | 3413 | ||
3414 | if (type == (int)Vehicle.TYPE_NONE) | 3414 | if (type == (int)Vehicle.TYPE_NONE) |
3415 | { | 3415 | { |
@@ -3417,8 +3417,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3417 | PhysActor.VehicleType = (int)Vehicle.TYPE_NONE; | 3417 | PhysActor.VehicleType = (int)Vehicle.TYPE_NONE; |
3418 | return; | 3418 | return; |
3419 | } | 3419 | } |
3420 | m_vehicle = new SOPVehicle(); | 3420 | m_vehicleParams = new SOPVehicle(); |
3421 | m_vehicle.ProcessTypeChange((Vehicle)type); | 3421 | m_vehicleParams.ProcessTypeChange((Vehicle)type); |
3422 | { | 3422 | { |
3423 | if (_parentID ==0 && PhysActor != null) | 3423 | if (_parentID ==0 && PhysActor != null) |
3424 | PhysActor.VehicleType = type; | 3424 | PhysActor.VehicleType = type; |
@@ -3428,10 +3428,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3428 | 3428 | ||
3429 | public void SetVehicleFlags(int param, bool remove) | 3429 | public void SetVehicleFlags(int param, bool remove) |
3430 | { | 3430 | { |
3431 | if (m_vehicle == null) | 3431 | if (m_vehicleParams == null) |
3432 | return; | 3432 | return; |
3433 | 3433 | ||
3434 | m_vehicle.ProcessVehicleFlags(param, remove); | 3434 | m_vehicleParams.ProcessVehicleFlags(param, remove); |
3435 | 3435 | ||
3436 | if (_parentID ==0 && PhysActor != null) | 3436 | if (_parentID ==0 && PhysActor != null) |
3437 | { | 3437 | { |
@@ -3441,10 +3441,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3441 | 3441 | ||
3442 | public void SetVehicleFloatParam(int param, float value) | 3442 | public void SetVehicleFloatParam(int param, float value) |
3443 | { | 3443 | { |
3444 | if (m_vehicle == null) | 3444 | if (m_vehicleParams == null) |
3445 | return; | 3445 | return; |
3446 | 3446 | ||
3447 | m_vehicle.ProcessFloatVehicleParam((Vehicle)param, value); | 3447 | m_vehicleParams.ProcessFloatVehicleParam((Vehicle)param, value); |
3448 | 3448 | ||
3449 | if (_parentID == 0 && PhysActor != null) | 3449 | if (_parentID == 0 && PhysActor != null) |
3450 | { | 3450 | { |
@@ -3454,10 +3454,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3454 | 3454 | ||
3455 | public void SetVehicleVectorParam(int param, Vector3 value) | 3455 | public void SetVehicleVectorParam(int param, Vector3 value) |
3456 | { | 3456 | { |
3457 | if (m_vehicle == null) | 3457 | if (m_vehicleParams == null) |
3458 | return; | 3458 | return; |
3459 | 3459 | ||
3460 | m_vehicle.ProcessVectorVehicleParam((Vehicle)param, value); | 3460 | m_vehicleParams.ProcessVectorVehicleParam((Vehicle)param, value); |
3461 | 3461 | ||
3462 | if (_parentID == 0 && PhysActor != null) | 3462 | if (_parentID == 0 && PhysActor != null) |
3463 | { | 3463 | { |
@@ -3467,10 +3467,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3467 | 3467 | ||
3468 | public void SetVehicleRotationParam(int param, Quaternion rotation) | 3468 | public void SetVehicleRotationParam(int param, Quaternion rotation) |
3469 | { | 3469 | { |
3470 | if (m_vehicle == null) | 3470 | if (m_vehicleParams == null) |
3471 | return; | 3471 | return; |
3472 | 3472 | ||
3473 | m_vehicle.ProcessRotationVehicleParam((Vehicle)param, rotation); | 3473 | m_vehicleParams.ProcessRotationVehicleParam((Vehicle)param, rotation); |
3474 | 3474 | ||
3475 | if (_parentID == 0 && PhysActor != null) | 3475 | if (_parentID == 0 && PhysActor != null) |
3476 | { | 3476 | { |
@@ -4637,8 +4637,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4637 | if (VolumeDetectActive) // change if not the default only | 4637 | if (VolumeDetectActive) // change if not the default only |
4638 | pa.SetVolumeDetect(1); | 4638 | pa.SetVolumeDetect(1); |
4639 | 4639 | ||
4640 | if (m_vehicle != null && LocalId == ParentGroup.RootPart.LocalId) | 4640 | if (m_vehicleParams != null && LocalId == ParentGroup.RootPart.LocalId) |
4641 | m_vehicle.SetVehicle(pa); | 4641 | m_vehicleParams.SetVehicle(pa); |
4642 | 4642 | ||
4643 | // we are going to tell rest of code about physics so better have this here | 4643 | // we are going to tell rest of code about physics so better have this here |
4644 | PhysActor = pa; | 4644 | PhysActor = pa; |
@@ -4676,7 +4676,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4676 | pa.RotationalVelocity = rotationalVelocity; | 4676 | pa.RotationalVelocity = rotationalVelocity; |
4677 | 4677 | ||
4678 | // if not vehicle and root part apply force and torque | 4678 | // if not vehicle and root part apply force and torque |
4679 | if ((m_vehicle == null || m_vehicle.Type == Vehicle.TYPE_NONE) | 4679 | if ((m_vehicleParams == null || m_vehicleParams.Type == Vehicle.TYPE_NONE) |
4680 | && LocalId == ParentGroup.RootPart.LocalId) | 4680 | && LocalId == ParentGroup.RootPart.LocalId) |
4681 | { | 4681 | { |
4682 | pa.Force = Force; | 4682 | pa.Force = Force; |