diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 97a4ae1..cff832e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1363,5 +1363,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1363 | 1363 | ||
1364 | base.Close(); | 1364 | base.Close(); |
1365 | } | 1365 | } |
1366 | |||
1367 | internal bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) | ||
1368 | { | ||
1369 | foreach( ScenePresence presence in m_scenePresences.Values ) | ||
1370 | { | ||
1371 | if( !presence.IsChildAgent ) | ||
1372 | { | ||
1373 | string name = presence.ControllingClient.FirstName + " " + presence.ControllingClient.LastName; | ||
1374 | |||
1375 | if( String.Compare( avatarName, name, true ) == 0 ) | ||
1376 | { | ||
1377 | avatar = presence; | ||
1378 | return true; | ||
1379 | } | ||
1380 | } | ||
1381 | } | ||
1382 | |||
1383 | avatar = null; | ||
1384 | return false; | ||
1385 | } | ||
1366 | } | 1386 | } |
1367 | } | 1387 | } |