* minor refactorings

afrisby
lbsa71 2007-11-29 06:07:48 +00:00
parent d05b121dff
commit a32bb91675
2 changed files with 7 additions and 7 deletions

View File

@ -1007,7 +1007,7 @@ namespace OpenSim.Region.Environment.Scenes
protected ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) protected ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child)
{ {
ScenePresence newAvatar = null; ScenePresence avatar = null;
byte[] visualParams; byte[] visualParams;
AvatarWearable[] wearables; AvatarWearable[] wearables;
@ -1018,14 +1018,14 @@ namespace OpenSim.Region.Environment.Scenes
AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams); AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams);
} }
newAvatar = m_innerScene.CreateAndAddScenePresence(client, child, wearables, visualParams); avatar = m_innerScene.CreateAndAddScenePresence(client, child, wearables, visualParams);
if (newAvatar.IsChildAgent) if (avatar.IsChildAgent)
{ {
newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement; avatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
} }
return newAvatar; return avatar;
} }
@ -1044,7 +1044,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
client.SendKillObject(avatar.RegionHandle, avatar.LocalId); client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
} }
catch (System.NullReferenceException NE) catch (System.NullReferenceException)
{ {
//We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway.

View File

@ -496,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes
/// ///
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public new SceneObjectGroup Copy(LLUUID cAgentID, LLUUID cGroupID) public SceneObjectGroup Copy(LLUUID cAgentID, LLUUID cGroupID)
{ {
SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone(); SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone();
dupe.m_parts = new Dictionary<LLUUID, SceneObjectPart>(); dupe.m_parts = new Dictionary<LLUUID, SceneObjectPart>();