protected void SetPrimitiveShapeParams(ISceneChildEntity part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge)
{
ObjectShapePacket.ObjectDataBlock shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist);
shapeBlock.ProfileCurve += fudge;
if (taper_b.x < 0f)
{
taper_b.x = 0f;
}
if (taper_b.x > 2f)
{
taper_b.x = 2f;
}
if (taper_b.y < 0f)
{
taper_b.y = 0f;
}
if (taper_b.y > 2f)
{
taper_b.y = 2f;
}
float tempFloat = (float)(100.0d * (2.0d - taper_b.x));
shapeBlock.PathScaleX = (byte)tempFloat;
tempFloat = (float)(100.0d * (2.0d - taper_b.y));
shapeBlock.PathScaleY = (byte)tempFloat;
if (topshear.x < -0.5f)
{
topshear.x = -0.5f;
}
if (topshear.x > 0.5f)
{
topshear.x = 0.5f;
}
if (topshear.y < -0.5f)
{
topshear.y = -0.5f;
}
if (topshear.y > 0.5f)
{
topshear.y = 0.5f;
}
tempFloat = (float)(100.0d * topshear.x);
shapeBlock.PathShearX = (byte)tempFloat;
tempFloat = (float)(100.0d * topshear.y);
shapeBlock.PathShearY = (byte)tempFloat;
part.Shape.SculptEntry = false;
part.UpdateShape(shapeBlock);
}