aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-16 02:00:36 +0000
committerMelanie Thielker2008-08-16 02:00:36 +0000
commit328ab79b783d4beaa5f954918e3b306950153c1a (patch)
treee2bf03b6cc7c6514a9c83968a716648394602e14 /OpenSim/Region/Environment/Scenes
parentPerils of copypaste. Missing references. (diff)
downloadopensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.zip
opensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.tar.gz
opensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.tar.bz2
opensim-SC_OLD-328ab79b783d4beaa5f954918e3b306950153c1a.tar.xz
Refactor a lot of direct calls to OGS1 to use the cached version instead.
Scripts can now no longer DOS the user server and there are a lot fewer gratuitious lookups of user profile data.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs9
2 files changed, 4 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 00d8298..22251e9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -3777,22 +3777,5 @@ namespace OpenSim.Region.Environment.Scenes
3777 //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); 3777 //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
3778 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); 3778 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
3779 } 3779 }
3780
3781// public bool IsAdministrator(LLUUID user)
3782// {
3783// if(RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero)
3784// {
3785// if(RegionInfo.MasterAvatarAssignedUUID == user)
3786// return true;
3787// }
3788//
3789// UserProfileData userProfile =
3790// CommsManager.UserService.GetUserProfile(user);
3791//
3792// if(userProfile.GodLevel >= 200)
3793// return true;
3794//
3795// return false;
3796// }
3797 } 3780 }
3798} 3781}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index b22643f..8dcfc03 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -2026,13 +2026,12 @@ namespace OpenSim.Region.Environment.Scenes
2026 { 2026 {
2027 if (godStatus) 2027 if (godStatus)
2028 { 2028 {
2029 // TODO: remove this cruft once the master avatar is fully 2029 // For now, assign god level 200 to anyone
2030 // deprecated. For now, assign god level 200 to anyone
2031 // who is granted god powers, but has no god level set. 2030 // who is granted god powers, but has no god level set.
2032 // 2031 //
2033 UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(agentID); 2032 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID);
2034 if(userProfile.GodLevel > 0) 2033 if(profile.UserProfile.GodLevel > 0)
2035 m_godlevel = userProfile.GodLevel; 2034 m_godlevel = profile.UserProfile.GodLevel;
2036 else 2035 else
2037 m_godlevel = 200; 2036 m_godlevel = 200;
2038 } 2037 }