public void osSetRot(UUID target, Quaternion rotation)
{
// This function has no security. It can be used to destroy
// arbitrary builds the user would normally have no rights to
//
CheckThreatLevel(ThreatLevel.VeryHigh, "osSetRot");
m_host.AddScriptLPS(1);
if (World.Entities.ContainsKey(target))
{
EntityBase entity;
if (World.Entities.TryGetValue(target, out entity))
{
if (entity is SceneObjectGroup)
((SceneObjectGroup)entity).UpdateGroupRotationR(rotation);
else if (entity is ScenePresence)
((ScenePresence)entity).Rotation = rotation;
}
}
else
{
OSSLError("osSetRot: Invalid target");
}
}