diff options
author | Justin Clark-Casey (justincc) | 2010-07-17 00:35:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-17 00:35:51 +0100 |
commit | 9cfa71d1bf77bcc3305bbfcd12d964496b2ce39d (patch) | |
tree | bcf80c00f063fe158e33b279fe11f1d92bbe8ae3 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-9cfa71d1bf77bcc3305bbfcd12d964496b2ce39d.zip opensim-SC_OLD-9cfa71d1bf77bcc3305bbfcd12d964496b2ce39d.tar.gz opensim-SC_OLD-9cfa71d1bf77bcc3305bbfcd12d964496b2ce39d.tar.bz2 opensim-SC_OLD-9cfa71d1bf77bcc3305bbfcd12d964496b2ce39d.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!
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 |
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 789bbb2..417cef4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5859,6 +5859,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5859 | PSYS_PART_MAX_AGE = 7, | 5859 | PSYS_PART_MAX_AGE = 7, |
5860 | PSYS_SRC_ACCEL = 8, | 5860 | PSYS_SRC_ACCEL = 8, |
5861 | PSYS_SRC_PATTERN = 9, | 5861 | PSYS_SRC_PATTERN = 9, |
5862 | PSYS_SRC_INNERANGLE = 10, | ||
5863 | PSYS_SRC_OUTERANGLE = 11, | ||
5862 | PSYS_SRC_TEXTURE = 12, | 5864 | PSYS_SRC_TEXTURE = 12, |
5863 | PSYS_SRC_BURST_RATE = 13, | 5865 | PSYS_SRC_BURST_RATE = 13, |
5864 | PSYS_SRC_BURST_PART_COUNT = 15, | 5866 | PSYS_SRC_BURST_PART_COUNT = 15, |
@@ -5991,6 +5993,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5991 | prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi; | 5993 | prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi; |
5992 | break; | 5994 | break; |
5993 | 5995 | ||
5996 | // PSYS_SRC_INNERANGLE and PSYS_SRC_ANGLE_BEGIN use the same variables. The | ||
5997 | // PSYS_SRC_OUTERANGLE and PSYS_SRC_ANGLE_END also use the same variable. The | ||
5998 | // client tells the difference between the two by looking at the 0x02 bit in | ||
5999 | // the PartFlags variable. | ||
6000 | case (int)ScriptBaseClass.PSYS_SRC_INNERANGLE: | ||
6001 | tempf = (float)rules.GetLSLFloatItem(i + 1); | ||
6002 | prules.InnerAngle = (float)tempf; | ||
6003 | prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. | ||
6004 | break; | ||
6005 | |||
6006 | case (int)ScriptBaseClass.PSYS_SRC_OUTERANGLE: | ||
6007 | tempf = (float)rules.GetLSLFloatItem(i + 1); | ||
6008 | prules.OuterAngle = (float)tempf; | ||
6009 | prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. | ||
6010 | break; | ||
6011 | |||
5994 | case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: | 6012 | case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: |
5995 | prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1)); | 6013 | prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1)); |
5996 | break; | 6014 | break; |
@@ -6047,11 +6065,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6047 | case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN: | 6065 | case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN: |
6048 | tempf = (float)rules.GetLSLFloatItem(i + 1); | 6066 | tempf = (float)rules.GetLSLFloatItem(i + 1); |
6049 | prules.InnerAngle = (float)tempf; | 6067 | prules.InnerAngle = (float)tempf; |
6068 | prules.PartFlags |= 0x02; // Set new angle format. | ||
6050 | break; | 6069 | break; |
6051 | 6070 | ||
6052 | case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END: | 6071 | case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END: |
6053 | tempf = (float)rules.GetLSLFloatItem(i + 1); | 6072 | tempf = (float)rules.GetLSLFloatItem(i + 1); |
6054 | prules.OuterAngle = (float)tempf; | 6073 | prules.OuterAngle = (float)tempf; |
6074 | prules.PartFlags |= 0x02; // Set new angle format. | ||
6055 | break; | 6075 | break; |
6056 | } | 6076 | } |
6057 | 6077 | ||