Mantis#1654. Thank you kindly, Matth for a patch that:

Updates llGetPrimitiveParams() and associated files.
0.6.0-stable
Charles Krinke 2008-07-03 15:34:05 +00:00
parent e3a583f4b4
commit 103093cf11
4 changed files with 34 additions and 32 deletions

View File

@ -2289,6 +2289,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public const int PRIM_TEXGEN = 22; public const int PRIM_TEXGEN = 22;
public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake 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_POINT_LIGHT = 23; // Huh?
public const int PRIM_GLOW = 25;
public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_DEFAULT = 0;
public const int PRIM_TEXGEN_PLANAR = 1; public const int PRIM_TEXGEN_PLANAR = 1;

View File

@ -5626,56 +5626,56 @@ namespace OpenSim.Region.ScriptEngine.Common
switch (code) switch (code)
{ {
case 2: // PRIM_MATERIAL case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL:
res.Add(new LSL_Types.LSLInteger(m_host.Material)); res.Add(new LSL_Types.LSLInteger(m_host.Material));
break; break;
case 3: // PRIM_PHYSICS case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS:
if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; 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) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 5: // PRIM_PHANTOM case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM:
if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 6: // PRIM_POSITION case (int)BuiltIn_Commands_BaseClass.PRIM_POSITION:
res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X,
m_host.AbsolutePosition.Y, m_host.AbsolutePosition.Y,
m_host.AbsolutePosition.Z)); m_host.AbsolutePosition.Z));
break; break;
case 7: // PRIM_SIZE case (int)BuiltIn_Commands_BaseClass.PRIM_SIZE:
res.Add(new LSL_Types.Vector3(m_host.Scale.X, res.Add(new LSL_Types.Vector3(m_host.Scale.X,
m_host.Scale.Y, m_host.Scale.Y,
m_host.Scale.Z)); m_host.Scale.Z));
break; break;
case 8: // PRIM_ROTATION case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION:
res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X,
m_host.RotationOffset.Y, m_host.RotationOffset.Y,
m_host.RotationOffset.Z, m_host.RotationOffset.Z,
m_host.RotationOffset.W)); m_host.RotationOffset.W));
break; break;
case 9: // PRIM_TYPE case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE:
// TODO-------------- // TODO--------------
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 17: // PRIM_TEXTURE case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE:
if (remain < 1) if (remain < 1)
return res; return res;
@ -5696,7 +5696,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLFloat(texface.Rotation)); res.Add(new LSL_Types.LSLFloat(texface.Rotation));
break; break;
case 18: // PRIM_COLOR case (int)BuiltIn_Commands_BaseClass.PRIM_COLOR:
if (remain < 1) if (remain < 1)
return res; return res;
@ -5714,7 +5714,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255));
break; break;
case 19: // PRIM_BUMP_SHINY case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -5725,7 +5725,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 20: // PRIM_FULLBRIGHT case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -5735,7 +5735,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 21: // PRIM_FLEXIBLE case (int)BuiltIn_Commands_BaseClass.PRIM_FLEXIBLE:
PrimitiveBaseShape shape = m_host.Shape; PrimitiveBaseShape shape = m_host.Shape;
if (shape.FlexiEntry) if (shape.FlexiEntry)
@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ScriptEngine.Common
shape.FlexiForceZ)); shape.FlexiForceZ));
break; break;
case 22: // PRIM_TEXGEN case (int)BuiltIn_Commands_BaseClass.PRIM_TEXGEN:
// TODO-------------- // TODO--------------
// (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
if (remain < 1) if (remain < 1)
@ -5763,7 +5763,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 23: // PRIM_POINT_LIGHT: case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT:
shape = m_host.Shape; shape = m_host.Shape;
if (shape.LightEntry) if (shape.LightEntry)
@ -5778,7 +5778,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff
break; break;
case 24: // PRIM_GLOW case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;

View File

@ -5391,56 +5391,56 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
switch (code) switch (code)
{ {
case 2: // PRIM_MATERIAL case (int)ScriptBaseClass.PRIM_MATERIAL:
res.Add(new LSL_Types.LSLInteger(m_host.Material)); res.Add(new LSL_Types.LSLInteger(m_host.Material));
break; break;
case 3: // PRIM_PHYSICS case (int)ScriptBaseClass.PRIM_PHYSICS:
if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 4: // PRIM_TEMP_ON_REZ case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 5: // PRIM_PHANTOM case (int)ScriptBaseClass.PRIM_PHANTOM:
if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0)
res.Add(new LSL_Types.LSLInteger(1)); res.Add(new LSL_Types.LSLInteger(1));
else else
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 6: // PRIM_POSITION case (int)ScriptBaseClass.PRIM_POSITION:
res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X,
m_host.AbsolutePosition.Y, m_host.AbsolutePosition.Y,
m_host.AbsolutePosition.Z)); m_host.AbsolutePosition.Z));
break; break;
case 7: // PRIM_SIZE case (int)ScriptBaseClass.PRIM_SIZE:
res.Add(new LSL_Types.Vector3(m_host.Scale.X, res.Add(new LSL_Types.Vector3(m_host.Scale.X,
m_host.Scale.Y, m_host.Scale.Y,
m_host.Scale.Z)); m_host.Scale.Z));
break; break;
case 8: // PRIM_ROTATION case (int)ScriptBaseClass.PRIM_ROTATION:
res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X,
m_host.RotationOffset.Y, m_host.RotationOffset.Y,
m_host.RotationOffset.Z, m_host.RotationOffset.Z,
m_host.RotationOffset.W)); m_host.RotationOffset.W));
break; break;
case 9: // PRIM_TYPE case (int)ScriptBaseClass.PRIM_TYPE:
// TODO-------------- // TODO--------------
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 17: // PRIM_TEXTURE case (int)ScriptBaseClass.PRIM_TEXTURE:
if (remain < 1) if (remain < 1)
return res; return res;
@ -5461,7 +5461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLFloat(texface.Rotation)); res.Add(new LSL_Types.LSLFloat(texface.Rotation));
break; break;
case 18: // PRIM_COLOR case (int)ScriptBaseClass.PRIM_COLOR:
if (remain < 1) if (remain < 1)
return res; return res;
@ -5479,7 +5479,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255));
break; break;
case 19: // PRIM_BUMP_SHINY case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -5490,7 +5490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 20: // PRIM_FULLBRIGHT case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 21: // PRIM_FLEXIBLE case (int)ScriptBaseClass.PRIM_FLEXIBLE:
PrimitiveBaseShape shape = m_host.Shape; PrimitiveBaseShape shape = m_host.Shape;
if (shape.FlexiEntry) if (shape.FlexiEntry)
@ -5517,7 +5517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
shape.FlexiForceZ)); shape.FlexiForceZ));
break; break;
case 22: // PRIM_TEXGEN case (int)ScriptBaseClass.PRIM_TEXGEN:
// TODO-------------- // TODO--------------
// (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
if (remain < 1) if (remain < 1)
@ -5528,7 +5528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 23: // PRIM_POINT_LIGHT: case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
shape = m_host.Shape; shape = m_host.Shape;
if (shape.LightEntry) if (shape.LightEntry)
@ -5543,7 +5543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff
break; break;
case 24: // PRIM_GLOW case (int)ScriptBaseClass.PRIM_GLOW:
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;

View File

@ -290,6 +290,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int PRIM_TEXGEN = 22; public const int PRIM_TEXGEN = 22;
public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake 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_POINT_LIGHT = 23; // Huh?
public const int PRIM_GLOW = 25;
public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_DEFAULT = 0;
public const int PRIM_TEXGEN_PLANAR = 1; public const int PRIM_TEXGEN_PLANAR = 1;