Added range-checking for the parameters to PRIM_POINT_LIGHT (used in llSetLinkPrimitiveParamsFast() )

0.8.0.3
Oren Hurvitz 2014-04-30 08:48:05 +03:00
parent 7f570636f8
commit 7862d1e20d
1 changed files with 3 additions and 3 deletions

View File

@ -1884,9 +1884,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f); part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f);
part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f); part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f);
part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f); part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f);
part.Shape.LightIntensity = intensity; part.Shape.LightIntensity = Util.Clip((float)intensity, 0.0f, 1.0f);
part.Shape.LightRadius = radius; part.Shape.LightRadius = Util.Clip((float)radius, 0.1f, 20.0f);
part.Shape.LightFalloff = falloff; part.Shape.LightFalloff = Util.Clip((float)falloff, 0.01f, 2.0f);
} }
else else
{ {