Hit a dead end with llParticleSystem (libsecondlife issues) so no functionality added yet, but did not want to loose work.

ThreadPoolClientBranch
alondria 2008-01-31 06:59:48 +00:00
parent a4bf98f4ba
commit 62ae3c9bf5
3 changed files with 50 additions and 25 deletions

View File

@ -1322,7 +1322,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// //
// DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
// //
public void llParticleSystem(List<Object> rules) public void llParticleSystem(LSL_Types.list rules)
{ {
m_LSL_Functions.llParticleSystem(rules); m_LSL_Functions.llParticleSystem(rules);
} }

View File

@ -2139,95 +2139,120 @@ namespace OpenSim.Region.ScriptEngine.Common
PSYS_SRC_ANGLE_END = 23 PSYS_SRC_ANGLE_END = 23
} }
public void llParticleSystem(List<Object> rules) // AL: This does not actually do anything yet. There are issues within Libsecondlife revolving around PSYS_PART_FLAGS
// (need to OR the values, but currently stores this within an enum) as well as discovery of how the CRC works and the
// actual packet.
public void llParticleSystem(LSL_Types.list rules)
{ {
Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
for (int i = 0; i < rules.Count; i += 2) LSL_Types.Vector3 tempv = new LSL_Types.Vector3();
for (int i = 0; i < rules.Length; i += 2)
{ {
switch ((int)rules[i]) switch ((int)rules.Data[i])
{ {
case (int)LSL_BaseClass.PSYS_PART_FLAGS: case (int)LSL_BaseClass.PSYS_PART_FLAGS:
prules.PartFlags = (uint)rules[i + 1]; prules.PartFlags = (uint)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_PART_START_COLOR: case (int)LSL_BaseClass.PSYS_PART_START_COLOR:
prules.PartStartColor = (LLColor)rules[i + 1]; tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.PartStartColor.R = (float)tempv.x;
prules.PartStartColor.G = (float)tempv.y;
prules.PartStartColor.B = (float)tempv.z;
break; break;
case (int)LSL_BaseClass.PSYS_PART_START_ALPHA: case (int)LSL_BaseClass.PSYS_PART_START_ALPHA:
//what is the cast? prules.PartStartColor = (LSL_Types.Vec)rules[i + 1]; prules.PartStartColor.A = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_PART_END_COLOR: case (int)LSL_BaseClass.PSYS_PART_END_COLOR:
prules.PartEndColor = (LLColor)rules[i + 1]; prules.PartEndColor = (LLColor)rules.Data[i + 1];
tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.PartEndColor.R = (float)tempv.x;
prules.PartEndColor.G = (float)tempv.y;
prules.PartEndColor.B = (float)tempv.z;
break; break;
case (int)LSL_BaseClass.PSYS_PART_END_ALPHA: case (int)LSL_BaseClass.PSYS_PART_END_ALPHA:
//what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; prules.PartEndColor.A = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_PART_START_SCALE: case (int)LSL_BaseClass.PSYS_PART_START_SCALE:
//what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.PartStartScaleX = (float)tempv.x;
prules.PartStartScaleY = (float)tempv.y;
break; break;
case (int)LSL_BaseClass.PSYS_PART_END_SCALE: case (int)LSL_BaseClass.PSYS_PART_END_SCALE:
//what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.PartEndScaleX = (float)tempv.x;
prules.PartEndScaleY = (float)tempv.y;
break; break;
case (int)LSL_BaseClass.PSYS_PART_MAX_AGE: case (int)LSL_BaseClass.PSYS_PART_MAX_AGE:
prules.MaxAge = (float)rules[i + 1]; prules.MaxAge = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_ACCEL: case (int)LSL_BaseClass.PSYS_SRC_ACCEL:
//what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.PartAcceleration.X = (float)tempv.x;
prules.PartAcceleration.Y = (float)tempv.y;
prules.PartAcceleration.Z = (float)tempv.z;
break; break;
case (int)LSL_BaseClass.PSYS_SRC_PATTERN: case (int)LSL_BaseClass.PSYS_SRC_PATTERN:
//what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; int tmpi = (int)rules.Data[i + 1];
prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi;
break; break;
case (int)LSL_BaseClass.PSYS_SRC_TEXTURE: case (int)LSL_BaseClass.PSYS_SRC_TEXTURE:
prules.Texture = (LLUUID)rules[i + 1]; prules.Texture = new LLUUID(rules.Data[i + 1].ToString());
break; break;
case (int)LSL_BaseClass.PSYS_SRC_BURST_RATE: case (int)LSL_BaseClass.PSYS_SRC_BURST_RATE:
prules.BurstRate = (float)rules[i + 1]; prules.BurstRate = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_BURST_PART_COUNT: case (int)LSL_BaseClass.PSYS_SRC_BURST_PART_COUNT:
prules.BurstPartCount = (byte)rules[i + 1]; prules.BurstPartCount = (byte)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_BURST_RADIUS: case (int)LSL_BaseClass.PSYS_SRC_BURST_RADIUS:
prules.BurstRadius = (float)rules[i + 1]; prules.BurstRadius = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_BURST_SPEED_MIN: case (int)LSL_BaseClass.PSYS_SRC_BURST_SPEED_MIN:
prules.BurstSpeedMin = (float)rules[i + 1]; prules.BurstSpeedMin = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_BURST_SPEED_MAX: case (int)LSL_BaseClass.PSYS_SRC_BURST_SPEED_MAX:
prules.BurstSpeedMax = (float)rules[i + 1]; prules.BurstSpeedMax = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_MAX_AGE: case (int)LSL_BaseClass.PSYS_SRC_MAX_AGE:
prules.MaxAge = (float)rules[i + 1]; prules.MaxAge = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_TARGET_KEY: case (int)LSL_BaseClass.PSYS_SRC_TARGET_KEY:
prules.Target = (LLUUID)rules[i + 1]; prules.Target = new LLUUID(rules.Data[i + 1].ToString());
break; break;
case (int)LSL_BaseClass.PSYS_SRC_OMEGA: case (int)LSL_BaseClass.PSYS_SRC_OMEGA:
// AL: This is an assumption, since it is the only thing that would match.
tempv = (LSL_Types.Vector3)rules.Data[i + 1];
prules.AngularVelocity.X = (float)tempv.x;
prules.AngularVelocity.Y = (float)tempv.y;
prules.AngularVelocity.Z = (float)tempv.z;
//cast?? prules.MaxAge = (float)rules[i + 1]; //cast?? prules.MaxAge = (float)rules[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_ANGLE_BEGIN: case (int)LSL_BaseClass.PSYS_SRC_ANGLE_BEGIN:
prules.InnerAngle = (float)rules[i + 1]; prules.InnerAngle = (float)rules.Data[i + 1];
break; break;
case (int)LSL_BaseClass.PSYS_SRC_ANGLE_END: case (int)LSL_BaseClass.PSYS_SRC_ANGLE_END:
prules.OuterAngle = (float)rules[i + 1]; prules.OuterAngle = (float)rules.Data[i + 1];
break; break;
} }
} }

View File

@ -439,7 +439,7 @@ namespace OpenSim.Region.ScriptEngine.Common
//wiki: double llGetRegionFPS() //wiki: double llGetRegionFPS()
double llGetRegionFPS(); double llGetRegionFPS();
//wiki: llParticleSystem(List<Object> rules //wiki: llParticleSystem(List<Object> rules
void llParticleSystem(List<object> rules); void llParticleSystem(LSL_Types.list rules);
//wiki: llGroundRepel(double height, integer water, double tau) //wiki: llGroundRepel(double height, integer water, double tau)
void llGroundRepel(double height, int water, double tau); void llGroundRepel(double height, int water, double tau);
void llGiveInventoryList(); void llGiveInventoryList();