mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
47e7febebc
commit
fb312279c9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user