Mantis#1521. Thank you kindly, HomerHorwitz for a patch that:

Increases the functionality of the particle system on both
script engines.
0.6.0-stable
Charles Krinke 2008-08-08 18:27:24 +00:00
parent 10822a139f
commit 87c5b0b926
1 changed files with 163 additions and 139 deletions

View File

@ -4460,11 +4460,34 @@ namespace OpenSim.Region.ScriptEngine.Common
return returnval;
}
private Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues()
{
Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
// TODO find out about the other defaults and add them here
ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f);
ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f);
ps.PartStartScaleX = 1.0f;
ps.PartStartScaleY = 1.0f;
ps.PartEndScaleX = 1.0f;
ps.PartEndScaleY = 1.0f;
ps.BurstSpeedMin = 1.0f;
ps.BurstSpeedMax = 1.0f;
ps.BurstRate = 0.1f;
ps.PartMaxAge = 10.0f;
return ps;
}
public void llParticleSystem(LSL_Types.list rules)
{
m_host.AddScriptLPS(1);
Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
if(rules.Length == 0)
{
m_host.RemoveParticleSystem();
}
else
{
Primitive.ParticleSystem prules = getNewParticleSystemWithSLDefaultValues();
LSL_Types.Vector3 tempv = new LSL_Types.Vector3();
float tempf = 0;
@ -4605,6 +4628,7 @@ namespace OpenSim.Region.ScriptEngine.Common
prules.CRC = 1;
m_host.AddNewParticleSystem(prules);
}
m_host.SendFullUpdateToAllClients();
}