Removing EntityBase.Rotation

This commit is contained in:
John Hurliman
2009-11-04 16:08:10 -08:00
parent 00130841db
commit ec2ebf2598
4 changed files with 23 additions and 16 deletions

View File

@@ -384,7 +384,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
if (World.Entities.ContainsKey(target))
{
World.Entities[target].Rotation = rotation;
EntityBase entity;
if (World.Entities.TryGetValue(target, out entity))
{
if (entity is SceneObjectGroup)
((SceneObjectGroup)entity).Rotation = rotation;
else if (entity is ScenePresence)
((ScenePresence)entity).Rotation = rotation;
}
}
else
{