refactoring to local variable for cleaner code

integration
SignpostMarv 2012-08-24 17:25:37 +01:00 committed by Justin Clark-Casey (justincc)
parent 2a2e120470
commit 5203665bb2
1 changed files with 5 additions and 2 deletions

View File

@ -2246,11 +2246,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams");
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
InitLSL(); InitLSL();
// One needs to cast m_LSL_Api because we're using functions not
// on the ILSL_Api interface.
LSL_Api LSL_Api = (LSL_Api)m_LSL_Api;
LSL_List retVal = new LSL_List(); LSL_List retVal = new LSL_List();
List<SceneObjectPart> parts = ((LSL_Api)m_LSL_Api).GetLinkParts(linknumber); List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber);
foreach (SceneObjectPart part in parts) foreach (SceneObjectPart part in parts)
{ {
((LSL_Api)m_LSL_Api).GetPrimParams(part, rules, ref retVal); LSL_Api.GetPrimParams(part, rules, ref retVal);
} }
return retVal; return retVal;
} }