diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index c7f4c20..b0cee03 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -496,6 +496,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
496 | SetAppearanceAssets(sp.UUID, sp.Appearance); | 496 | SetAppearanceAssets(sp.UUID, sp.Appearance); |
497 | 497 | ||
498 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); | 498 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); |
499 | |||
500 | // Trigger this here because it's the final step in the set/queue/save process for appearance setting. | ||
501 | // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes). | ||
502 | m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); | ||
499 | } | 503 | } |
500 | 504 | ||
501 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) | 505 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 34d3da7..569c235 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -173,6 +173,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | 173 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); |
174 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 174 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
175 | 175 | ||
176 | public delegate void AvatarAppearanceChange(ScenePresence avatar); | ||
177 | public event AvatarAppearanceChange OnAvatarAppearanceChange; | ||
178 | |||
176 | public event Action<ScenePresence> OnSignificantClientMovement; | 179 | public event Action<ScenePresence> OnSignificantClientMovement; |
177 | 180 | ||
178 | public delegate void IncomingInstantMessage(GridInstantMessage message); | 181 | public delegate void IncomingInstantMessage(GridInstantMessage message); |
@@ -1290,6 +1293,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1290 | } | 1293 | } |
1291 | } | 1294 | } |
1292 | 1295 | ||
1296 | public void TriggerAvatarAppearanceChanged(ScenePresence avatar) | ||
1297 | { | ||
1298 | AvatarAppearanceChange handler = OnAvatarAppearanceChange; | ||
1299 | if (handler != null) | ||
1300 | { | ||
1301 | foreach (AvatarAppearanceChange d in handler.GetInvocationList()) | ||
1302 | { | ||
1303 | try | ||
1304 | { | ||
1305 | d(avatar); | ||
1306 | } | ||
1307 | catch (Exception e) | ||
1308 | { | ||
1309 | m_log.ErrorFormat( | ||
1310 | "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", | ||
1311 | e.Message, e.StackTrace); | ||
1312 | } | ||
1313 | } | ||
1314 | } | ||
1315 | } | ||
1316 | |||
1293 | public void TriggerIncomingInstantMessage(GridInstantMessage message) | 1317 | public void TriggerIncomingInstantMessage(GridInstantMessage message) |
1294 | { | 1318 | { |
1295 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; | 1319 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; |