aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-17 00:35:51 +0100
committerDiva Canto2010-07-17 15:18:01 -0700
commit20c68cc531d141536854ff256da2b46ce37a2086 (patch)
treea5c62cba5634e7fe7785b91919e0210f2d13c4fd /OpenSim/Region/ScriptEngine/Shared
parentFix bugs in llRot2Euler() (diff)
downloadopensim-SC-20c68cc531d141536854ff256da2b46ce37a2086.zip
opensim-SC-20c68cc531d141536854ff256da2b46ce37a2086.tar.gz
opensim-SC-20c68cc531d141536854ff256da2b46ce37a2086.tar.bz2
opensim-SC-20c68cc531d141536854ff256da2b46ce37a2086.tar.xz
Allow use of old angle rules PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE in llParticleSystem()
This is a patch from http://opensimulator.org/mantis/view.php?id=3201 Thanks Micheil Martin!
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
1 files changed, 20 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 41e1a33..f3f7269 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5860,6 +5860,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5860 PSYS_PART_MAX_AGE = 7, 5860 PSYS_PART_MAX_AGE = 7,
5861 PSYS_SRC_ACCEL = 8, 5861 PSYS_SRC_ACCEL = 8,
5862 PSYS_SRC_PATTERN = 9, 5862 PSYS_SRC_PATTERN = 9,
5863 PSYS_SRC_INNERANGLE = 10,
5864 PSYS_SRC_OUTERANGLE = 11,
5863 PSYS_SRC_TEXTURE = 12, 5865 PSYS_SRC_TEXTURE = 12,
5864 PSYS_SRC_BURST_RATE = 13, 5866 PSYS_SRC_BURST_RATE = 13,
5865 PSYS_SRC_BURST_PART_COUNT = 15, 5867 PSYS_SRC_BURST_PART_COUNT = 15,
@@ -5992,6 +5994,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5992 prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi; 5994 prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi;
5993 break; 5995 break;
5994 5996
5997 // PSYS_SRC_INNERANGLE and PSYS_SRC_ANGLE_BEGIN use the same variables. The
5998 // PSYS_SRC_OUTERANGLE and PSYS_SRC_ANGLE_END also use the same variable. The
5999 // client tells the difference between the two by looking at the 0x02 bit in
6000 // the PartFlags variable.
6001 case (int)ScriptBaseClass.PSYS_SRC_INNERANGLE:
6002 tempf = (float)rules.GetLSLFloatItem(i + 1);
6003 prules.InnerAngle = (float)tempf;
6004 prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off.
6005 break;
6006
6007 case (int)ScriptBaseClass.PSYS_SRC_OUTERANGLE:
6008 tempf = (float)rules.GetLSLFloatItem(i + 1);
6009 prules.OuterAngle = (float)tempf;
6010 prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off.
6011 break;
6012
5995 case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: 6013 case (int)ScriptBaseClass.PSYS_SRC_TEXTURE:
5996 prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1)); 6014 prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1));
5997 break; 6015 break;
@@ -6048,11 +6066,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6048 case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN: 6066 case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN:
6049 tempf = (float)rules.GetLSLFloatItem(i + 1); 6067 tempf = (float)rules.GetLSLFloatItem(i + 1);
6050 prules.InnerAngle = (float)tempf; 6068 prules.InnerAngle = (float)tempf;
6069 prules.PartFlags |= 0x02; // Set new angle format.
6051 break; 6070 break;
6052 6071
6053 case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END: 6072 case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END:
6054 tempf = (float)rules.GetLSLFloatItem(i + 1); 6073 tempf = (float)rules.GetLSLFloatItem(i + 1);
6055 prules.OuterAngle = (float)tempf; 6074 prules.OuterAngle = (float)tempf;
6075 prules.PartFlags |= 0x02; // Set new angle format.
6056 break; 6076 break;
6057 } 6077 }
6058 6078