From 103093cf114bfb64715f21b0f239b3ffe78fd873 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 3 Jul 2008 15:34:05 +0000 Subject: Mantis#1654. Thank you kindly, Matth for a patch that: Updates llGetPrimitiveParams() and associated files. --- .../Common/BuiltIn_Commands_BaseClass.cs | 1 + .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 32 +++++++++++----------- .../Shared/Api/Implementation/LSL_Api.cs | 32 +++++++++++----------- .../Shared/Api/Runtime/LSL_Constants.cs | 1 + 4 files changed, 34 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index 90eb8c7..2d9fd09 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -2289,6 +2289,7 @@ namespace OpenSim.Region.ScriptEngine.Common public const int PRIM_TEXGEN = 22; public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake public const int PRIM_POINT_LIGHT = 23; // Huh? + public const int PRIM_GLOW = 25; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index aa4fb13..5016cd5 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -5626,56 +5626,56 @@ namespace OpenSim.Region.ScriptEngine.Common switch (code) { - case 2: // PRIM_MATERIAL + case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL: res.Add(new LSL_Types.LSLInteger(m_host.Material)); break; - case 3: // PRIM_PHYSICS + case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 4: // PRIM_TEMP_ON_REZ + case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 5: // PRIM_PHANTOM + case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 6: // PRIM_POSITION + case (int)BuiltIn_Commands_BaseClass.PRIM_POSITION: res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, m_host.AbsolutePosition.Z)); break; - case 7: // PRIM_SIZE + case (int)BuiltIn_Commands_BaseClass.PRIM_SIZE: res.Add(new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z)); break; - case 8: // PRIM_ROTATION + case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION: res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W)); break; - case 9: // PRIM_TYPE + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE: // TODO-------------- res.Add(new LSL_Types.LSLInteger(0)); break; - case 17: // PRIM_TEXTURE + case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE: if (remain < 1) return res; @@ -5696,7 +5696,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLFloat(texface.Rotation)); break; - case 18: // PRIM_COLOR + case (int)BuiltIn_Commands_BaseClass.PRIM_COLOR: if (remain < 1) return res; @@ -5714,7 +5714,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); break; - case 19: // PRIM_BUMP_SHINY + case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY: // TODO-------------- if (remain < 1) return res; @@ -5725,7 +5725,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLInteger(0)); break; - case 20: // PRIM_FULLBRIGHT + case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT: // TODO-------------- if (remain < 1) return res; @@ -5735,7 +5735,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLInteger(0)); break; - case 21: // PRIM_FLEXIBLE + case (int)BuiltIn_Commands_BaseClass.PRIM_FLEXIBLE: PrimitiveBaseShape shape = m_host.Shape; if (shape.FlexiEntry) @@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ScriptEngine.Common shape.FlexiForceZ)); break; - case 22: // PRIM_TEXGEN + case (int)BuiltIn_Commands_BaseClass.PRIM_TEXGEN: // TODO-------------- // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) if (remain < 1) @@ -5763,7 +5763,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLInteger(0)); break; - case 23: // PRIM_POINT_LIGHT: + case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT: shape = m_host.Shape; if (shape.LightEntry) @@ -5778,7 +5778,7 @@ namespace OpenSim.Region.ScriptEngine.Common res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff break; - case 24: // PRIM_GLOW + case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW: // TODO-------------- if (remain < 1) return res; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d540e13..1579233 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5391,56 +5391,56 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api switch (code) { - case 2: // PRIM_MATERIAL + case (int)ScriptBaseClass.PRIM_MATERIAL: res.Add(new LSL_Types.LSLInteger(m_host.Material)); break; - case 3: // PRIM_PHYSICS + case (int)ScriptBaseClass.PRIM_PHYSICS: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 4: // PRIM_TEMP_ON_REZ + case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 5: // PRIM_PHANTOM + case (int)ScriptBaseClass.PRIM_PHANTOM: if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) res.Add(new LSL_Types.LSLInteger(1)); else res.Add(new LSL_Types.LSLInteger(0)); break; - case 6: // PRIM_POSITION + case (int)ScriptBaseClass.PRIM_POSITION: res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, m_host.AbsolutePosition.Z)); break; - case 7: // PRIM_SIZE + case (int)ScriptBaseClass.PRIM_SIZE: res.Add(new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z)); break; - case 8: // PRIM_ROTATION + case (int)ScriptBaseClass.PRIM_ROTATION: res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W)); break; - case 9: // PRIM_TYPE + case (int)ScriptBaseClass.PRIM_TYPE: // TODO-------------- res.Add(new LSL_Types.LSLInteger(0)); break; - case 17: // PRIM_TEXTURE + case (int)ScriptBaseClass.PRIM_TEXTURE: if (remain < 1) return res; @@ -5461,7 +5461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLFloat(texface.Rotation)); break; - case 18: // PRIM_COLOR + case (int)ScriptBaseClass.PRIM_COLOR: if (remain < 1) return res; @@ -5479,7 +5479,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); break; - case 19: // PRIM_BUMP_SHINY + case (int)ScriptBaseClass.PRIM_BUMP_SHINY: // TODO-------------- if (remain < 1) return res; @@ -5490,7 +5490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLInteger(0)); break; - case 20: // PRIM_FULLBRIGHT + case (int)ScriptBaseClass.PRIM_FULLBRIGHT: // TODO-------------- if (remain < 1) return res; @@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLInteger(0)); break; - case 21: // PRIM_FLEXIBLE + case (int)ScriptBaseClass.PRIM_FLEXIBLE: PrimitiveBaseShape shape = m_host.Shape; if (shape.FlexiEntry) @@ -5517,7 +5517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api shape.FlexiForceZ)); break; - case 22: // PRIM_TEXGEN + case (int)ScriptBaseClass.PRIM_TEXGEN: // TODO-------------- // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) if (remain < 1) @@ -5528,7 +5528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLInteger(0)); break; - case 23: // PRIM_POINT_LIGHT: + case (int)ScriptBaseClass.PRIM_POINT_LIGHT: shape = m_host.Shape; if (shape.LightEntry) @@ -5543,7 +5543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff break; - case 24: // PRIM_GLOW + case (int)ScriptBaseClass.PRIM_GLOW: // TODO-------------- if (remain < 1) return res; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 69be69b..c086f22 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -290,6 +290,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_TEXGEN = 22; public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake public const int PRIM_POINT_LIGHT = 23; // Huh? + public const int PRIM_GLOW = 25; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; -- cgit v1.1