From 8388fe0669f9d140028d1925284491b21a09a1bf Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 8 Sep 2008 14:30:35 +0000 Subject: * some if inversions and added {}'s for readability --- .../Region/ClientStack/RegionApplicationBase.cs | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index d1572fd..dfe922b 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -138,30 +138,31 @@ namespace OpenSim.Region.ClientStack // TODO: Remove this cruft once MasterAvatar is fully deprecated //Master Avatar Setup UserProfileData masterAvatar; - if (scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero) - { - masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); - scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; - scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName; - } - else + if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero) { masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword); } - - if (masterAvatar != null) + else { - m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]", scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName); - scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID; + masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); + scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; + scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName; } - else + + if (masterAvatar == null) { m_log.Info("[PARCEL]: No master avatar found, using null."); scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero; } + else + { + m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]", + scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName); + scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID; + } scene.LoadPrimsFromStorage(regionInfo.originRegionID); scene.StartTimer(); -- cgit v1.1