diff options
author | Melanie | 2013-02-06 08:03:04 +0000 |
---|---|---|
committer | Melanie | 2013-02-06 08:03:04 +0000 |
commit | e5beb480eaf23fa7454728724de80b2a67ded1e8 (patch) | |
tree | 232bfd14074cc3730ab02bdefa339b99a587f1dc /OpenSim/Region/ScriptEngine/Shared | |
parent | minor: Add explanation of MaptileStaticUUID setting in Regions.ini.example (diff) | |
download | opensim-SC_OLD-e5beb480eaf23fa7454728724de80b2a67ded1e8.zip opensim-SC_OLD-e5beb480eaf23fa7454728724de80b2a67ded1e8.tar.gz opensim-SC_OLD-e5beb480eaf23fa7454728724de80b2a67ded1e8.tar.bz2 opensim-SC_OLD-e5beb480eaf23fa7454728724de80b2a67ded1e8.tar.xz |
Partial port of Avination's support for the new physics parameters.
Implements the parameters as properties, the serialization and
database storage (MySQL only). Implements llSetPrimitiveParams for
prim physics shape and the other 4 extra params. Only the prim shape type
"None" is currently functional. No support for the Viewer UI (yet), that
will be ported in due course. Lots more to port, this is a large-ish changeset.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 11 |
2 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4fa3c60..64052ae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7594,6 +7594,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7594 | part.ScriptSetPhysicsStatus(physics); | 7594 | part.ScriptSetPhysicsStatus(physics); |
7595 | break; | 7595 | break; |
7596 | 7596 | ||
7597 | case (int)ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE: | ||
7598 | if (remain < 1) | ||
7599 | return null; | ||
7600 | |||
7601 | int shape_type = rules.GetLSLIntegerItem(idx++); | ||
7602 | |||
7603 | ExtraPhysicsData physdata = new ExtraPhysicsData(); | ||
7604 | physdata.Density = part.Density; | ||
7605 | physdata.Bounce = part.Bounciness; | ||
7606 | physdata.GravitationModifier = part.GravityModifier; | ||
7607 | physdata.PhysShapeType = (PhysShapeType)shape_type; | ||
7608 | |||
7609 | part.UpdateExtraPhysics(physdata); | ||
7610 | |||
7611 | break; | ||
7612 | |||
7597 | case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: | 7613 | case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: |
7598 | if (remain < 1) | 7614 | if (remain < 1) |
7599 | return null; | 7615 | return null; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 9bf1a64..bd66ba3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -661,6 +661,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
661 | public const int PRIM_MEDIA_PERM_GROUP = 2; | 661 | public const int PRIM_MEDIA_PERM_GROUP = 2; |
662 | public const int PRIM_MEDIA_PERM_ANYONE = 4; | 662 | public const int PRIM_MEDIA_PERM_ANYONE = 4; |
663 | 663 | ||
664 | public const int PRIM_PHYSICS_SHAPE_TYPE = 30; | ||
665 | public const int PRIM_PHYSICS_SHAPE_PRIM = 0; | ||
666 | public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; | ||
667 | public const int PRIM_PHYSICS_SHAPE_NONE = 1; | ||
668 | |||
669 | public const int PRIM_PHYSICS_MATERIAL = 31; | ||
670 | public const int DENSITY = 1; | ||
671 | public const int FRICTION = 2; | ||
672 | public const int RESTITUTION = 4; | ||
673 | public const int GRAVITY_MULTIPLIER = 8; | ||
674 | |||
664 | // extra constants for llSetPrimMediaParams | 675 | // extra constants for llSetPrimMediaParams |
665 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); | 676 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); |
666 | public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); | 677 | public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); |