aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2008-07-03 15:34:05 +0000
committerCharles Krinke2008-07-03 15:34:05 +0000
commit103093cf114bfb64715f21b0f239b3ffe78fd873 (patch)
tree21cf245a5c22ab8e4f4dc508cb6e96714a3cabb0
parentMantis#1653. Thank you kindly, Vytek for a patch that: (diff)
downloadopensim-SC_OLD-103093cf114bfb64715f21b0f239b3ffe78fd873.zip
opensim-SC_OLD-103093cf114bfb64715f21b0f239b3ffe78fd873.tar.gz
opensim-SC_OLD-103093cf114bfb64715f21b0f239b3ffe78fd873.tar.bz2
opensim-SC_OLD-103093cf114bfb64715f21b0f239b3ffe78fd873.tar.xz
Mantis#1654. Thank you kindly, Matth for a patch that:
Updates llGetPrimitiveParams() and associated files.
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs32
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
4 files changed, 34 insertions, 32 deletions
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
2289 public const int PRIM_TEXGEN = 22; 2289 public const int PRIM_TEXGEN = 22;
2290 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake 2290 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake
2291 public const int PRIM_POINT_LIGHT = 23; // Huh? 2291 public const int PRIM_POINT_LIGHT = 23; // Huh?
2292 public const int PRIM_GLOW = 25;
2292 public const int PRIM_TEXGEN_DEFAULT = 0; 2293 public const int PRIM_TEXGEN_DEFAULT = 0;
2293 public const int PRIM_TEXGEN_PLANAR = 1; 2294 public const int PRIM_TEXGEN_PLANAR = 1;
2294 2295
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
5626 5626
5627 switch (code) 5627 switch (code)
5628 { 5628 {
5629 case 2: // PRIM_MATERIAL 5629 case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL:
5630 res.Add(new LSL_Types.LSLInteger(m_host.Material)); 5630 res.Add(new LSL_Types.LSLInteger(m_host.Material));
5631 break; 5631 break;
5632 5632
5633 case 3: // PRIM_PHYSICS 5633 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS:
5634 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 5634 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0)
5635 res.Add(new LSL_Types.LSLInteger(1)); 5635 res.Add(new LSL_Types.LSLInteger(1));
5636 else 5636 else
5637 res.Add(new LSL_Types.LSLInteger(0)); 5637 res.Add(new LSL_Types.LSLInteger(0));
5638 break; 5638 break;
5639 5639
5640 case 4: // PRIM_TEMP_ON_REZ 5640 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ:
5641 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 5641 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0)
5642 res.Add(new LSL_Types.LSLInteger(1)); 5642 res.Add(new LSL_Types.LSLInteger(1));
5643 else 5643 else
5644 res.Add(new LSL_Types.LSLInteger(0)); 5644 res.Add(new LSL_Types.LSLInteger(0));
5645 break; 5645 break;
5646 5646
5647 case 5: // PRIM_PHANTOM 5647 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM:
5648 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 5648 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0)
5649 res.Add(new LSL_Types.LSLInteger(1)); 5649 res.Add(new LSL_Types.LSLInteger(1));
5650 else 5650 else
5651 res.Add(new LSL_Types.LSLInteger(0)); 5651 res.Add(new LSL_Types.LSLInteger(0));
5652 break; 5652 break;
5653 5653
5654 case 6: // PRIM_POSITION 5654 case (int)BuiltIn_Commands_BaseClass.PRIM_POSITION:
5655 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, 5655 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X,
5656 m_host.AbsolutePosition.Y, 5656 m_host.AbsolutePosition.Y,
5657 m_host.AbsolutePosition.Z)); 5657 m_host.AbsolutePosition.Z));
5658 break; 5658 break;
5659 5659
5660 case 7: // PRIM_SIZE 5660 case (int)BuiltIn_Commands_BaseClass.PRIM_SIZE:
5661 res.Add(new LSL_Types.Vector3(m_host.Scale.X, 5661 res.Add(new LSL_Types.Vector3(m_host.Scale.X,
5662 m_host.Scale.Y, 5662 m_host.Scale.Y,
5663 m_host.Scale.Z)); 5663 m_host.Scale.Z));
5664 break; 5664 break;
5665 5665
5666 case 8: // PRIM_ROTATION 5666 case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION:
5667 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, 5667 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X,
5668 m_host.RotationOffset.Y, 5668 m_host.RotationOffset.Y,
5669 m_host.RotationOffset.Z, 5669 m_host.RotationOffset.Z,
5670 m_host.RotationOffset.W)); 5670 m_host.RotationOffset.W));
5671 break; 5671 break;
5672 5672
5673 case 9: // PRIM_TYPE 5673 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE:
5674 // TODO-------------- 5674 // TODO--------------
5675 res.Add(new LSL_Types.LSLInteger(0)); 5675 res.Add(new LSL_Types.LSLInteger(0));
5676 break; 5676 break;
5677 5677
5678 case 17: // PRIM_TEXTURE 5678 case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE:
5679 if (remain < 1) 5679 if (remain < 1)
5680 return res; 5680 return res;
5681 5681
@@ -5696,7 +5696,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5696 res.Add(new LSL_Types.LSLFloat(texface.Rotation)); 5696 res.Add(new LSL_Types.LSLFloat(texface.Rotation));
5697 break; 5697 break;
5698 5698
5699 case 18: // PRIM_COLOR 5699 case (int)BuiltIn_Commands_BaseClass.PRIM_COLOR:
5700 if (remain < 1) 5700 if (remain < 1)
5701 return res; 5701 return res;
5702 5702
@@ -5714,7 +5714,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5714 res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); 5714 res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255));
5715 break; 5715 break;
5716 5716
5717 case 19: // PRIM_BUMP_SHINY 5717 case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY:
5718 // TODO-------------- 5718 // TODO--------------
5719 if (remain < 1) 5719 if (remain < 1)
5720 return res; 5720 return res;
@@ -5725,7 +5725,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5725 res.Add(new LSL_Types.LSLInteger(0)); 5725 res.Add(new LSL_Types.LSLInteger(0));
5726 break; 5726 break;
5727 5727
5728 case 20: // PRIM_FULLBRIGHT 5728 case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT:
5729 // TODO-------------- 5729 // TODO--------------
5730 if (remain < 1) 5730 if (remain < 1)
5731 return res; 5731 return res;
@@ -5735,7 +5735,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5735 res.Add(new LSL_Types.LSLInteger(0)); 5735 res.Add(new LSL_Types.LSLInteger(0));
5736 break; 5736 break;
5737 5737
5738 case 21: // PRIM_FLEXIBLE 5738 case (int)BuiltIn_Commands_BaseClass.PRIM_FLEXIBLE:
5739 PrimitiveBaseShape shape = m_host.Shape; 5739 PrimitiveBaseShape shape = m_host.Shape;
5740 5740
5741 if (shape.FlexiEntry) 5741 if (shape.FlexiEntry)
@@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5752 shape.FlexiForceZ)); 5752 shape.FlexiForceZ));
5753 break; 5753 break;
5754 5754
5755 case 22: // PRIM_TEXGEN 5755 case (int)BuiltIn_Commands_BaseClass.PRIM_TEXGEN:
5756 // TODO-------------- 5756 // TODO--------------
5757 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) 5757 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
5758 if (remain < 1) 5758 if (remain < 1)
@@ -5763,7 +5763,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5763 res.Add(new LSL_Types.LSLInteger(0)); 5763 res.Add(new LSL_Types.LSLInteger(0));
5764 break; 5764 break;
5765 5765
5766 case 23: // PRIM_POINT_LIGHT: 5766 case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT:
5767 shape = m_host.Shape; 5767 shape = m_host.Shape;
5768 5768
5769 if (shape.LightEntry) 5769 if (shape.LightEntry)
@@ -5778,7 +5778,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5778 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff 5778 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff
5779 break; 5779 break;
5780 5780
5781 case 24: // PRIM_GLOW 5781 case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW:
5782 // TODO-------------- 5782 // TODO--------------
5783 if (remain < 1) 5783 if (remain < 1)
5784 return res; 5784 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
5391 5391
5392 switch (code) 5392 switch (code)
5393 { 5393 {
5394 case 2: // PRIM_MATERIAL 5394 case (int)ScriptBaseClass.PRIM_MATERIAL:
5395 res.Add(new LSL_Types.LSLInteger(m_host.Material)); 5395 res.Add(new LSL_Types.LSLInteger(m_host.Material));
5396 break; 5396 break;
5397 5397
5398 case 3: // PRIM_PHYSICS 5398 case (int)ScriptBaseClass.PRIM_PHYSICS:
5399 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 5399 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0)
5400 res.Add(new LSL_Types.LSLInteger(1)); 5400 res.Add(new LSL_Types.LSLInteger(1));
5401 else 5401 else
5402 res.Add(new LSL_Types.LSLInteger(0)); 5402 res.Add(new LSL_Types.LSLInteger(0));
5403 break; 5403 break;
5404 5404
5405 case 4: // PRIM_TEMP_ON_REZ 5405 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
5406 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 5406 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0)
5407 res.Add(new LSL_Types.LSLInteger(1)); 5407 res.Add(new LSL_Types.LSLInteger(1));
5408 else 5408 else
5409 res.Add(new LSL_Types.LSLInteger(0)); 5409 res.Add(new LSL_Types.LSLInteger(0));
5410 break; 5410 break;
5411 5411
5412 case 5: // PRIM_PHANTOM 5412 case (int)ScriptBaseClass.PRIM_PHANTOM:
5413 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 5413 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0)
5414 res.Add(new LSL_Types.LSLInteger(1)); 5414 res.Add(new LSL_Types.LSLInteger(1));
5415 else 5415 else
5416 res.Add(new LSL_Types.LSLInteger(0)); 5416 res.Add(new LSL_Types.LSLInteger(0));
5417 break; 5417 break;
5418 5418
5419 case 6: // PRIM_POSITION 5419 case (int)ScriptBaseClass.PRIM_POSITION:
5420 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, 5420 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X,
5421 m_host.AbsolutePosition.Y, 5421 m_host.AbsolutePosition.Y,
5422 m_host.AbsolutePosition.Z)); 5422 m_host.AbsolutePosition.Z));
5423 break; 5423 break;
5424 5424
5425 case 7: // PRIM_SIZE 5425 case (int)ScriptBaseClass.PRIM_SIZE:
5426 res.Add(new LSL_Types.Vector3(m_host.Scale.X, 5426 res.Add(new LSL_Types.Vector3(m_host.Scale.X,
5427 m_host.Scale.Y, 5427 m_host.Scale.Y,
5428 m_host.Scale.Z)); 5428 m_host.Scale.Z));
5429 break; 5429 break;
5430 5430
5431 case 8: // PRIM_ROTATION 5431 case (int)ScriptBaseClass.PRIM_ROTATION:
5432 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, 5432 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X,
5433 m_host.RotationOffset.Y, 5433 m_host.RotationOffset.Y,
5434 m_host.RotationOffset.Z, 5434 m_host.RotationOffset.Z,
5435 m_host.RotationOffset.W)); 5435 m_host.RotationOffset.W));
5436 break; 5436 break;
5437 5437
5438 case 9: // PRIM_TYPE 5438 case (int)ScriptBaseClass.PRIM_TYPE:
5439 // TODO-------------- 5439 // TODO--------------
5440 res.Add(new LSL_Types.LSLInteger(0)); 5440 res.Add(new LSL_Types.LSLInteger(0));
5441 break; 5441 break;
5442 5442
5443 case 17: // PRIM_TEXTURE 5443 case (int)ScriptBaseClass.PRIM_TEXTURE:
5444 if (remain < 1) 5444 if (remain < 1)
5445 return res; 5445 return res;
5446 5446
@@ -5461,7 +5461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5461 res.Add(new LSL_Types.LSLFloat(texface.Rotation)); 5461 res.Add(new LSL_Types.LSLFloat(texface.Rotation));
5462 break; 5462 break;
5463 5463
5464 case 18: // PRIM_COLOR 5464 case (int)ScriptBaseClass.PRIM_COLOR:
5465 if (remain < 1) 5465 if (remain < 1)
5466 return res; 5466 return res;
5467 5467
@@ -5479,7 +5479,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5479 res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); 5479 res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255));
5480 break; 5480 break;
5481 5481
5482 case 19: // PRIM_BUMP_SHINY 5482 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
5483 // TODO-------------- 5483 // TODO--------------
5484 if (remain < 1) 5484 if (remain < 1)
5485 return res; 5485 return res;
@@ -5490,7 +5490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5490 res.Add(new LSL_Types.LSLInteger(0)); 5490 res.Add(new LSL_Types.LSLInteger(0));
5491 break; 5491 break;
5492 5492
5493 case 20: // PRIM_FULLBRIGHT 5493 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
5494 // TODO-------------- 5494 // TODO--------------
5495 if (remain < 1) 5495 if (remain < 1)
5496 return res; 5496 return res;
@@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5500 res.Add(new LSL_Types.LSLInteger(0)); 5500 res.Add(new LSL_Types.LSLInteger(0));
5501 break; 5501 break;
5502 5502
5503 case 21: // PRIM_FLEXIBLE 5503 case (int)ScriptBaseClass.PRIM_FLEXIBLE:
5504 PrimitiveBaseShape shape = m_host.Shape; 5504 PrimitiveBaseShape shape = m_host.Shape;
5505 5505
5506 if (shape.FlexiEntry) 5506 if (shape.FlexiEntry)
@@ -5517,7 +5517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5517 shape.FlexiForceZ)); 5517 shape.FlexiForceZ));
5518 break; 5518 break;
5519 5519
5520 case 22: // PRIM_TEXGEN 5520 case (int)ScriptBaseClass.PRIM_TEXGEN:
5521 // TODO-------------- 5521 // TODO--------------
5522 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) 5522 // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
5523 if (remain < 1) 5523 if (remain < 1)
@@ -5528,7 +5528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5528 res.Add(new LSL_Types.LSLInteger(0)); 5528 res.Add(new LSL_Types.LSLInteger(0));
5529 break; 5529 break;
5530 5530
5531 case 23: // PRIM_POINT_LIGHT: 5531 case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
5532 shape = m_host.Shape; 5532 shape = m_host.Shape;
5533 5533
5534 if (shape.LightEntry) 5534 if (shape.LightEntry)
@@ -5543,7 +5543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5543 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff 5543 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff
5544 break; 5544 break;
5545 5545
5546 case 24: // PRIM_GLOW 5546 case (int)ScriptBaseClass.PRIM_GLOW:
5547 // TODO-------------- 5547 // TODO--------------
5548 if (remain < 1) 5548 if (remain < 1)
5549 return res; 5549 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
290 public const int PRIM_TEXGEN = 22; 290 public const int PRIM_TEXGEN = 22;
291 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake 291 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake
292 public const int PRIM_POINT_LIGHT = 23; // Huh? 292 public const int PRIM_POINT_LIGHT = 23; // Huh?
293 public const int PRIM_GLOW = 25;
293 public const int PRIM_TEXGEN_DEFAULT = 0; 294 public const int PRIM_TEXGEN_DEFAULT = 0;
294 public const int PRIM_TEXGEN_PLANAR = 1; 295 public const int PRIM_TEXGEN_PLANAR = 1;
295 296