diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 8a2b6d0b5..4ddc58d18 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -486,10 +486,14 @@ LLThreadSafeRefCount::LLThreadSafeRefCount() : LLThreadSafeRefCount::~LLThreadSafeRefCount() { + llassert(mRef == 0); + /* TEMPORARILY disable erroring out on deleting this object with + nonzero reference count until the problem in AIStateMachine is fixed if (mRef != 0) { llerrs << "deleting non-zero reference" << llendl; } + */ } //============================================================================ diff --git a/indra/lscript/lscript_byteformat.h b/indra/lscript/lscript_byteformat.h index bf810817b..09c8b1281 100644 --- a/indra/lscript/lscript_byteformat.h +++ b/indra/lscript/lscript_byteformat.h @@ -536,6 +536,7 @@ typedef enum e_lscript_runtime_permissions SCRIPT_PERMISSION_TRACK_CAMERA, SCRIPT_PERMISSION_CONTROL_CAMERA, SCRIPT_PERMISSION_TELEPORT, + SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS, SCRIPT_PERMISSION_EOF } LSCRIPTRunTimePermissions; @@ -553,6 +554,7 @@ const U32 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_EOF] = (0x1 << 10),// SCRIPT_PERMISSION_TRACK_CAMERA (0x1 << 11),// SCRIPT_PERMISSION_CONTROL_CAMERA (0x1 << 12),// SCRIPT_PERMISSION_TELEPORT + (0x1 << 15),// SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS }; // http_request string constants diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index 4837b4f6b..3d91fafe8 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -532,6 +532,14 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "llUpdateCharacter", NULL, "l"); addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vvl"); + // Server RC LeTigre 12.10.12.265819 new function + addFunction(0.f, 0.f, dummy_func, "llGetSimStats", "f", "i"); + + // Server RC LeTigre 13.03.22.272565 new function + addFunction(0.f, 0.f, dummy_func, "llSetAnimationOverride", NULL, "ss"); + addFunction(0.f, 0.f, dummy_func, "llGetAnimationOverride", "s", "s"); + addFunction(0.f, 0.f, dummy_func, "llResetAnimationOverride", NULL, "s"); + // SL-LSL Functions to be added above this line // --------------------------------------------- // NOTE bytecode placement no longer applies, viewers do not compile scripts anymore (confirmed with LL, also noted by Phoenix/Firestorm team.) diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index b084a5894..d43e54989 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -52,7 +52,7 @@ changed changed( integer change ):Triggered various event change the task:(tes remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY) http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL -transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data. +transaction_result transaction_result(key id, integer success, string data): Triggered when currency is given to task path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used # integer constants @@ -99,6 +99,7 @@ PERMISSION_CHANGE_LINKS Passed to llRequestPermissions library function to req PERMISSION_TRACK_CAMERA Passed to llRequestPermissions library function to request permission to track agent's camera PERMISSION_CONTROL_CAMERA Passed to llRequestPermissions library function to request permission to change agent's camera PERMISSION_TELEPORT Passed to llRequestPermissions library function to request permission to teleport agent +PERMISSION_OVERRIDE_ANIMATIONS Passed to llRequestPermissions library function to request permission to override agent's animations DEBUG_CHANNEL Chat channel reserved for debug and error messages from scripts PUBLIC_CHANNEL Chat channel that broadcasts to all nearby users diff --git a/indra/newview/app_settings/lsl_functions_sl.xml b/indra/newview/app_settings/lsl_functions_sl.xml index 51074f13e..563414c6e 100644 --- a/indra/newview/app_settings/lsl_functions_sl.xml +++ b/indra/newview/app_settings/lsl_functions_sl.xml @@ -1013,5 +1013,12 @@ llGetSimStats + + llSetAnimationOverride + + llGetAnimationOverride + + llResetAnimationOverride + \ No newline at end of file diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h index 56391eda9..30e83b140 100644 --- a/indra/newview/llestateinfomodel.h +++ b/indra/newview/llestateinfomodel.h @@ -56,7 +56,8 @@ public: const std::string& getName() const { return mName; } const LLUUID& getOwnerID() const { return mOwnerID; } U32 getID() const { return mID; } - F32 getSunHour() const { return getUseFixedSun() ? mSunHour : 0.f; } + F32 getSunHour() const { return mSunHour; } + bool getGlobalTime() const { return !(mSunHour || getUseFixedSun()); } // setters void setUseFixedSun(bool val); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 382d747a5..e8cb41ad5 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -160,6 +160,39 @@ void unpack_request_params( */ +namespace +{ + void on_caps_received(LLTabContainer* tab) + { + if (!tab) return; + const LLViewerRegion* region = gAgent.getRegion(); + tab->enableTabButton(tab->getIndexForPanel(tab->getPanelByName("panel_env_info")), region && !region->getCapability("EnvironmentSettings").empty()); + } + + void handle_opposite(const bool& off, LLUICtrl* opposite) + { + opposite->setEnabled(!off); + if (off) opposite->setValue(false); + } + + void on_change_use_other_sun(const LLSD& param, LLUICtrl* opposite, LLUICtrl* slider) + { + handle_opposite(param.asBoolean(), opposite); + slider->setEnabled(false); + } + + void on_change_fixed_sun(const LLSD& param, LLUICtrl* opposite, LLUICtrl* slider) + { + bool fixed_sun = param.asBoolean(); + handle_opposite(fixed_sun, opposite); + slider->setEnabled(fixed_sun); + } + + const float get_sun_hour(const LLUICtrl* sun_hour) + { + return sun_hour->getEnabled() ? sun_hour->getValue().asFloat() : 0.f; + } +} bool estate_dispatch_initialized = false; @@ -352,6 +385,15 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLTrans::findString(sim_type, sim_type); // try localizing sim product name } + // Disable Environment Tab when not supported + if (region) + { + if (region->capabilitiesReceived()) + on_caps_received(tab); + else + region->setCapabilitiesReceivedCallback(boost::bind(on_caps_received, tab)); + } + // GENERAL PANEL panel = tab->getChild("General"); panel->getChild("region_text")->setValue(LLSD(sim_name)); @@ -629,6 +671,27 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) getChildView("im_btn")->setEnabled(allow_modify); getChildView("manage_telehub_btn")->setEnabled(allow_modify); + // Support Legacy Region Environment + { + const LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + bool estate_sun = region_info.mUseEstateSun; + getChild("use_estate_sun_check")->setValue(estate_sun); + getChild("fixed_sun_check")->setEnabled(allow_modify && !estate_sun); + getChild("sun_hour_slider")->setEnabled(allow_modify && !estate_sun); + if (estate_sun) + { + getChild("use_estate_sun_check")->setEnabled(allow_modify); + getChild("fixed_sun_check")->setValue(false); + } + else + { + bool fixed_sun = region_info.getUseFixedSun(); + getChild("use_estate_sun_check")->setEnabled(allow_modify && !fixed_sun); + getChild("fixed_sun_check")->setValue(fixed_sun); + getChild("sun_hour_slider")->setValue(region_info.mSunHour); + } + } + // Data gets filled in by processRegionInfo return LLPanelRegionInfo::refreshFromRegion(region); @@ -647,6 +710,9 @@ BOOL LLPanelRegionGeneralInfo::postBuild() initCtrl("access_combo"); initCtrl("restrict_pushobject"); initCtrl("block_parcel_search_check"); + initCtrl("use_estate_sun_check"); + initCtrl("fixed_sun_check"); + initCtrl("sun_hour_slider"); initHelpBtn("terraform_help", "HelpRegionBlockTerraform"); initHelpBtn("fly_help", "HelpRegionBlockFly"); @@ -658,12 +724,23 @@ BOOL LLPanelRegionGeneralInfo::postBuild() initHelpBtn("land_resell_help", "HelpRegionLandResell"); initHelpBtn("parcel_changes_help", "HelpParcelChanges"); initHelpBtn("parcel_search_help", "HelpRegionSearch"); + initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun"); + initHelpBtn("fixed_sun_help", "HelpRegionFixedSun"); childSetAction("kick_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickKick, this)); childSetAction("kick_all_btn", onClickKickAll, this); childSetAction("im_btn", onClickMessage, this); childSetAction("manage_telehub_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickManageTelehub, this)); + // Set up the Legacy Region Environment checkboxes + { + LLUICtrl* estate_sun = getChild("use_estate_sun_check"); + LLUICtrl* fixed_sun = getChild("fixed_sun_check"); + LLUICtrl* hour_slider = getChild("sun_hour_slider"); + estate_sun->setCommitCallback(boost::bind(on_change_use_other_sun, _2, fixed_sun, hour_slider)); + fixed_sun->setCommitCallback(boost::bind(on_change_fixed_sun, _2, estate_sun, hour_slider)); + } + return LLPanelRegionInfo::postBuild(); } @@ -839,6 +916,13 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings); } + // Send the Legacy Region Environment + LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + region_info.mUseEstateSun = getChild("use_estate_sun_check")->getValue().asBoolean(); + region_info.setUseFixedSun(getChild("fixed_sun_check")->getValue().asBoolean()); + region_info.mSunHour = get_sun_hour(getChild("sun_hour_slider")); + region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice()); + // if we changed access levels, tell user about it LLViewerRegion* region = gAgent.getRegion(); if (region && (getChild("access_combo")->getValue().asInteger() != region->getSimAccess()) ) @@ -2015,11 +2099,16 @@ BOOL LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls initCtrl("externally_visible_check"); + initCtrl("use_global_time_check"); + initCtrl("fixed_sun_check"); + initCtrl("sun_hour_slider"); initCtrl("allow_direct_teleport"); initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); + initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); + initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); @@ -2027,6 +2116,15 @@ BOOL LLPanelEstateInfo::postBuild() initHelpBtn("ban_resident_help", "HelpEstateBanResident"); initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); + // Set up the Legacy Estate Environment checkboxes + { + LLUICtrl* global_time = getChild("use_global_time_check"); + LLUICtrl* fixed_sun = getChild("fixed_sun_check"); + LLUICtrl* hour_slider = getChild("sun_hour_slider"); + global_time->setCommitCallback(boost::bind(on_change_use_other_sun, _2, fixed_sun, hour_slider)); + fixed_sun->setCommitCallback(boost::bind(on_change_fixed_sun, _2, global_time, hour_slider)); + } + getChild("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild("allowed_avatar_name_list"); if (avatar_name_list) @@ -2106,14 +2204,36 @@ void LLPanelEstateInfo::refreshFromEstate() getChild("limit_payment")->setValue(estate_info.getDenyAnonymous()); getChild("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified()); - // Ensure appriopriate state of the management UI + // Ensure appropriate state of the management UI updateControls(gAgent.getRegion()); + // Support Legacy Estate Environment + { + const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + bool global_time = estate_info.getGlobalTime(); + getChild("use_global_time_check")->setValue(global_time); + getChild("fixed_sun_check")->setEnabled(!global_time); + getChild("sun_hour_slider")->setEnabled(!global_time); + if (global_time) + { + getChild("use_global_time_check")->setEnabled(true); + getChild("fixed_sun_check")->setValue(false); + } + else + { + bool fixed_sun = estate_info.getUseFixedSun(); + getChild("use_global_time_check")->setEnabled(!fixed_sun); + getChild("fixed_sun_check")->setValue(fixed_sun); + F32 sun_hour = estate_info.getSunHour(); + if (sun_hour < 6.0f) sun_hour += 24.0f; + getChild("sun_hour_slider")->setValue(sun_hour); + } + } refresh(); } BOOL LLPanelEstateInfo::sendUpdate() { - llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl; + llinfos << "LLPanelEstateInfo::sendUpdate()" << llendl; LLNotification::Params params("ChangeLindenEstate"); params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); @@ -2141,8 +2261,9 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); // update model - estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore estate_info.setIsExternallyVisible(getChild("externally_visible_check")->getValue().asBoolean()); + estate_info.setUseFixedSun(getChild("fixed_sun_check")->getValue().asBoolean()); + estate_info.setSunHour(get_sun_hour(getChild("sun_hour_slider"))); estate_info.setAllowDirectTeleport(getChild("allow_direct_teleport")->getValue().asBoolean()); estate_info.setDenyAnonymous(getChild("limit_payment")->getValue().asBoolean()); estate_info.setDenyAgeUnverified(getChild("limit_age_verified")->getValue().asBoolean()); diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index d354dc516..a6a181014 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -885,7 +885,7 @@ void LLPanelDisplay::apply() void LLPanelDisplay::onChangeQuality(LLUICtrl* caller) { - LLSliderCtrl* sldr = static_cast(caller); + LLSlider* sldr = dynamic_cast(caller); if(sldr == NULL) { diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 590e24648..3892c8795 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -35,6 +35,7 @@ // viewer #include "llagent.h" #include "llviewerregion.h" +#include "llestateinfomodel.h" // For supporting legacy environment void LLRegionInfoModel::reset() { @@ -107,6 +108,17 @@ void LLRegionInfoModel::sendRegionTerrain(const LLUUID& invoice) const strings.push_back(buffer); buffer = llformat("%f", mSunHour); strings.push_back(buffer); + if (mUseEstateSun) + { + // Grab estate info, the user decided to set the region back to estate time. JC + LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + estate_global_time = estate_info.getGlobalTime(); + if (!estate_global_time) + { + estate_fixed_sun = estate_info.getUseFixedSun(); + estate_sun_hour = estate_info.getSunHour(); + } + } buffer = llformat("%s", (estate_global_time ? "Y" : "N") ); strings.push_back(buffer); buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") ); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 044765ba0..9e9f785c7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2404,6 +2404,14 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) if (update_complete && assertInitialized()) { drawablep->setState(LLDrawable::BUILT); + //Workaround for 'missing prims' until it's fixed upstream by LL. + //Sometimes clearing CLEAR_INVISIBLE and FORCE_INVISIBLE in LLPipeline::stateSort was too late. Do it here instead, before + //the rebuild state is picked up on and LLVolumeGeometryManager::rebuildGeom is called. + //If the FORCE_INVISIBLE isn't cleared before the rebuildGeom call, the geometry will NOT BE REBUILT! + if(drawablep->isState(LLDrawable::CLEAR_INVISIBLE)) + { + drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE); + } mGeometryChanges++; } return update_complete; diff --git a/indra/newview/skins/apollo/keywords.ini b/indra/newview/skins/apollo/keywords.ini index 5a85f42a1..d6b7595f4 100644 --- a/indra/newview/skins/apollo/keywords.ini +++ b/indra/newview/skins/apollo/keywords.ini @@ -52,7 +52,7 @@ changed changed( integer change ):Triggered various event change the task:(tes remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY) http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL -transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data. +transaction_result transaction_result(key id, integer success, string data): Triggered when currency is given to task path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used # integer constants @@ -99,6 +99,7 @@ PERMISSION_CHANGE_LINKS Passed to llRequestPermissions library function to req PERMISSION_TRACK_CAMERA Passed to llRequestPermissions library function to request permission to track agent's camera PERMISSION_CONTROL_CAMERA Passed to llRequestPermissions library function to request permission to change agent's camera PERMISSION_TELEPORT Passed to llRequestPermissions library function to request permission to teleport agent +PERMISSION_OVERRIDE_ANIMATIONS Passed to llRequestPermissions library function to request permission to override agent's animations DEBUG_CHANNEL Chat channel reserved for debug and error messages from scripts PUBLIC_CHANNEL Chat channel that broadcasts to all nearby users diff --git a/indra/newview/skins/default/xui/en-us/panel_region_estate.xml b/indra/newview/skins/default/xui/en-us/panel_region_estate.xml index e22662dff..66b2e3d8a 100644 --- a/indra/newview/skins/default/xui/en-us/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en-us/panel_region_estate.xml @@ -82,10 +82,10 @@