Mantis 6922: No particles are generated if their size exceeds the maximum allowed size.

This patch ensures that no particle scal value can exceed 4.0
0.8.0.3
Talun 2014-03-21 11:31:44 +00:00 committed by Justin Clark-Casey (justincc)
parent 47e7febebc
commit fb312279c9
1 changed files with 10 additions and 4 deletions

View File

@ -6409,14 +6409,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case (int)ScriptBaseClass.PSYS_PART_START_SCALE:
tempv = rules.GetVector3Item(i + 1);
prules.PartStartScaleX = (float)tempv.x;
prules.PartStartScaleY = (float)tempv.y;
prules.PartStartScaleX = validParticleScale((float)tempv.x);
prules.PartStartScaleY = validParticleScale((float)tempv.y);
break;
case (int)ScriptBaseClass.PSYS_PART_END_SCALE:
tempv = rules.GetVector3Item(i + 1);
prules.PartEndScaleX = (float)tempv.x;
prules.PartEndScaleY = (float)tempv.y;
prules.PartEndScaleX = validParticleScale((float)tempv.x);
prules.PartEndScaleY = validParticleScale((float)tempv.y);
break;
case (int)ScriptBaseClass.PSYS_PART_MAX_AGE:
@ -6547,6 +6547,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.SendFullUpdateToAllClients();
}
private float validParticleScale(float value)
{
if (value > 4.0f) return 4.0f;
return value;
}
public void llGroundRepel(double height, int water, double tau)
{
m_host.AddScriptLPS(1);