Mantis#2583. Thank you kindly, Idb for a patch that solves:

PRIM_TEMP_ON_REZ and PRIM_MATERIAL are not implemented in 
llSetPrimitiveParams so support for these is in the patch.
Also two deprecated functions throw errors. They are changed 
to behave as in SL: llSetPrimURL - Does nothing except the sleep 
(currently commented out) & llRefreshPrimURL shouts 
"llRefreshPrimURL - not yet supported" on the error channel
0.6.1-post-fixes
Charles Krinke 2008-11-08 21:25:26 +00:00
parent 5e4def3ee7
commit edb2344796
1 changed files with 31 additions and 16 deletions

View File

@ -6045,6 +6045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetPrimitiveParams(LSL_List rules)
{
m_host.AddScriptLPS(1);
SetPrimParams(m_host, rules);
}
@ -6329,15 +6330,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case (int)ScriptBaseClass.PRIM_MATERIAL:
if (remain < 1)
return;
if (part != null)
{
/* Unhandled at this time - sends "Unhandled" message
will enable when available
byte material = Convert.ToByte((int)rules.GetLSLIntegerItem(idx++));
part.Material = material;
*/
int mat = rules.GetLSLIntegerItem(idx++);
if (mat < 0 || mat > 7)
return;
}
part.Material = Convert.ToByte(mat);
break;
case (int)ScriptBaseClass.PRIM_PHANTOM:
if (remain < 1)
@ -6352,7 +6349,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
phantom = false;
part.ScriptSetPhantomStatus(phantom);
part.ScheduleFullUpdate();
break;
case (int)ScriptBaseClass.PRIM_PHYSICS:
if (remain < 1)
@ -6365,8 +6361,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else
physics = false;
m_host.ScriptSetPhysicsStatus(physics);
part.ScheduleFullUpdate();
part.ScriptSetPhysicsStatus(physics);
break;
case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
if (remain < 1)
return;
string temp = rules.Data[idx++].ToString();
bool tempOnRez;
if (temp.Equals("1"))
tempOnRez = true;
else
tempOnRez = false;
part.ScriptSetTemporaryStatus(tempOnRez);
break;
}
}
@ -7999,17 +8007,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return new LSL_Rotation();
}
/// <summary>
/// The SL implementation does nothing, it is deprecated
/// This duplicates SL
/// </summary>
public void llSetPrimURL(string url)
{
m_host.AddScriptLPS(1);
NotImplemented("llSetPrimURL");
// ScriptSleep(2000);
}
/// <summary>
/// The SL implementation shouts an error, it is deprecated
/// This duplicates SL
/// </summary>
public void llRefreshPrimURL()
{
m_host.AddScriptLPS(1);
NotImplemented("llRefreshPrimURL");
ShoutError("llRefreshPrimURL - not yet supported");
// ScriptSleep(20000);
}