diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-08 09:30:39 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-08 09:30:39 -0700 |
commit | 470d1595cc1c1c7c7ec3ab192e68622751423354 (patch) | |
tree | 079cd01cc1b247973f2e5fd589389cc8e0013b13 /indra/newview/llviewermessage.cpp | |
parent | 06097302f4ad8786913e77514d5d60678da3160d (diff) | |
parent | 34322f8f37380df868703051230f2a4109602b3f (diff) |
Merge viewer-release
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e610387b37..982f1980f1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3760,7 +3760,6 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) void process_time_synch(LLMessageSystem *mesgsys, void **user_data) { LLVector3 sun_direction; - LLVector3 moon_direction; LLVector3 sun_ang_velocity; F32 phase; U64 space_time_usec; @@ -3780,26 +3779,14 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data) LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec); - LL_DEBUGS("ENVIRONMENT") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL; + LL_DEBUGS("WindlightSync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL; - F32 region_phase = LLEnvironment::instance().getRegionProgress(); - if (region_phase >= 0.0) - { - F32 adjusted_phase = fmodf(phase / F_TWO_PI + 0.25, 1.f); - F32 delta_phase = adjusted_phase - region_phase; - - LL_DEBUGS("ENVIRONMENT") << "adjusted phase = " << adjusted_phase << " local phase = " << region_phase << " delta = " << delta_phase << LL_ENDL; - - if (!LLEnvironment::instance().isExtendedEnvironmentEnabled() && (fabs(delta_phase) > 0.125)) - { - LL_INFOS("ENVIRONMENT") << "Adjusting environment to match region. adjustment=" << delta_phase << LL_ENDL; - LLEnvironment::instance().adjustRegionOffset(delta_phase); - } - } - - /* We decode these parts of the message but ignore them - as the real values are provided elsewhere. */ - (void)sun_direction, (void)moon_direction, (void)phase; + gSky.setSunPhase(phase); + gSky.setSunTargetDirection(sun_direction, sun_ang_velocity); + if ( !(gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || gSky.getOverrideSun()) ) + { + gSky.setSunDirection(sun_direction, sun_ang_velocity); + } } void process_sound_trigger(LLMessageSystem *msg, void **) @@ -5661,7 +5648,7 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) { if (notification->getName() == "ScriptQuestionCaution" || notification->getName() == "ScriptQuestion" - || notification->getName() == "UnknownScriptQuestion") + /*|| notification->getName() == "UnknownScriptQuestion"*/) { return (notification->getPayload()["task_id"].asUUID() == blocked_id); } @@ -5678,7 +5665,7 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestionCaution", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_3("ScriptQuestionExperience", script_question_cb); -static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb); +//static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb); void process_script_experience_details(const LLSD& experience_details, LLSD args, LLSD payload) { @@ -5776,10 +5763,14 @@ void process_script_question(LLMessageSystem *msg, void **user_data) // check whether permission question should cause special caution dialog caution |= (script_perm.caution); - if ((("ScriptTakeMoney" == script_perm.question) && has_not_only_debit) || - (script_perm.question == "JoinAnExperience")) + if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit) continue; + if (script_perm.question == "JoinAnExperience") + { // Some experience only permissions do not have an explicit permission bit. Add them here. + script_question += " " + LLTrans::getString("ForceSitAvatar") + "\n"; + } + script_question += " " + LLTrans::getString(script_perm.question) + "\n"; } } @@ -5789,14 +5780,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["QUESTIONS"] = script_question; if (known_questions != questions) - { // This is in addition to the normal dialog. - LLSD payload; - payload["task_id"] = taskid; - payload["item_id"] = itemid; - payload["object_name"] = object_name; - - args["DOWNLOADURL"] = LLTrans::getString("ViewerDownloadURL"); - LLNotificationsUtil::add("UnknownScriptQuestion",args,payload); + { + // This is in addition to the normal dialog. + // Viewer got a request for not supported/implemented permission + LL_WARNS("Messaging") << "Object \"" << object_name << "\" requested " << script_question + << " permission. Permission is unknown and can't be granted. Item id: " << itemid + << " taskid:" << taskid << LL_ENDL; } if (known_questions) |