summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index c9bd7851ed..56d2c76dc7 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -36,8 +36,10 @@
#include "llanimationstates.h"
#include "llbottomtray.h"
#include "llcallingcard.h"
+#include "llcapabilitylistener.h"
#include "llchannelmanager.h"
#include "llconsole.h"
+#include "llenvmanager.h"
#include "llfirstuse.h"
#include "llfloatercamera.h"
#include "llfloaterreg.h"
@@ -76,6 +78,7 @@
#include "llwindow.h"
#include "llworld.h"
#include "llworldmap.h"
+#include "stringize.h"
using namespace LLVOAvatarDefines;
@@ -620,6 +623,16 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
gSky.mVOGroundp->setRegion(regionp);
}
+ // Notify windlight managers
+ bool teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE);
+ if (teleport)
+ {
+ LLEnvManager::getInstance()->notifyTP();
+ }
+ else
+ {
+ LLEnvManager::getInstance()->notifyCrossing();
+ }
}
else
{
@@ -636,6 +649,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
// Update all of the regions.
LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal);
+
+ // Notify windlight managers about login
+ LLEnvManager::getInstance()->notifyLogin();
}
}
mRegionp = regionp;
@@ -653,6 +669,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
LLSelectMgr::getInstance()->updateSelectionCenter();
LLFloaterMove::sUpdateFlyingStatus();
+
+ // notify EnvManager that a refresh is needed
+ LLEnvManager::instance().refreshFromStorage(LLEnvKey::SCOPE_REGION);
}