From 37363787af3f5d67ebd64d0ce8959c0b7a5f2c57 Mon Sep 17 00:00:00 2001 From: Kadah Date: Wed, 9 Mar 2011 21:12:42 -0800 Subject: [PATCH] ParcelWL: Apply new settings without delay on TP --- indra/newview/kcwlinterface.cpp | 7 +++++++ indra/newview/kcwlinterface.h | 2 ++ indra/newview/llagent.cpp | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/indra/newview/kcwlinterface.cpp b/indra/newview/kcwlinterface.cpp index 5c1a6ee5b6..2e5ba07d1f 100644 --- a/indra/newview/kcwlinterface.cpp +++ b/indra/newview/kcwlinterface.cpp @@ -93,6 +93,13 @@ void KCWindlightInterface::ParcelChange() mEventTimer.reset(); mEventTimer.start(); + + // Apply new WL settings instantly on TP + if (mTPing) + { + mTPing = false; + tick(); + } } } diff --git a/indra/newview/kcwlinterface.h b/indra/newview/kcwlinterface.h index 4641a9beb7..e8c2b6b0da 100644 --- a/indra/newview/kcwlinterface.h +++ b/indra/newview/kcwlinterface.h @@ -46,6 +46,7 @@ public: bool ParsePacelForWLSettings(const std::string& desc, LLSD& settings); void onClickWLStatusButton(); bool WLset; //display the status bar icon? + void setTPing(bool value) { mTPing = value; } private: bool callbackParcelWL(const LLSD& notification, const LLSD& response); @@ -65,4 +66,5 @@ protected: LLSD mCurrentSettings; S32 mLastZ; bool mWeChangedIt; //dont reset anything if we didnt do it + bool mTPing; //agent just TP'd (hack, might be better way) }; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8b8b464010..8e0e443bae 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -80,6 +80,7 @@ #include "rlvhandler.h" #include "rlvui.h" // [/RLVa:KB] ++#include "kcwlinterface.h" using namespace LLVOAvatarDefines; @@ -3356,6 +3357,9 @@ bool LLAgent::teleportCore(bool is_local) //release geometry from old location gPipeline.resetVertexBuffers(); + + // bit of a hack -KC + KCWindlightInterface::instance().setTPing(true); } make_ui_sound("UISndTeleportOut");