diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index 88c64bde1..e0c24fc97 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -148,7 +148,7 @@ const char *LLAssetType::lookup(LLAssetType::EType asset_type) } // static -LLAssetType::EType LLAssetType::lookup( const char* name ) +LLAssetType::EType LLAssetType::lookup(const char* name) { return lookup(ll_safe_string(name)); } @@ -186,7 +186,7 @@ const char *LLAssetType::lookupHumanReadable(LLAssetType::EType asset_type) } // static -LLAssetType::EType LLAssetType::lookupHumanReadable( const char* name ) +LLAssetType::EType LLAssetType::lookupHumanReadable(const char* name) { return lookupHumanReadable(ll_safe_string(name)); } @@ -208,12 +208,9 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string& readable_ return AT_NONE; } -//NOTE: LLAssetType::lookupDragAndDropType & LLAssetType::generateDescriptionFor moved to newview/llviewerassettype.h - // static bool LLAssetType::lookupCanLink(EType asset_type) { - //Check that enabling all these other types as linkable doesn't break things. const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) @@ -221,9 +218,6 @@ bool LLAssetType::lookupCanLink(EType asset_type) return entry->mCanLink; } return false; - - /*return (asset_type == AT_CLOTHING || asset_type == AT_OBJECT || asset_type == AT_CATEGORY || - asset_type == AT_BODYPART || asset_type == AT_GESTURE);*/ } // static @@ -268,4 +262,3 @@ bool LLAssetType::lookupIsAssetIDKnowable(EType asset_type) } return false; } - diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 542b4ab15..993f16d04 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -35,7 +35,7 @@ #include #include "llerror.h" -#include "lltypeinfolookup.h" +#include "llstl.h" namespace LLInitParam { @@ -212,14 +212,6 @@ namespace LLInitParam public: - struct CompareTypeID - { - bool operator()(const std::type_info* lhs, const std::type_info* rhs) const - { - return lhs->before(*rhs); - } - }; - typedef std::vector > name_stack_t; typedef std::pair name_stack_range_t; typedef std::vector possible_values_t; @@ -228,9 +220,9 @@ namespace LLInitParam typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&); typedef boost::function parser_inspect_func_t; - typedef LLTypeInfoLookup parser_read_func_map_t; - typedef LLTypeInfoLookup parser_write_func_map_t; - typedef LLTypeInfoLookup parser_inspect_func_map_t; + typedef std::map parser_read_func_map_t; + typedef std::map parser_write_func_map_t; + typedef std::map parser_inspect_func_map_t; Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map) : mParseSilently(false), diff --git a/indra/llcommon/llkeythrottle.h b/indra/llcommon/llkeythrottle.h index 4ac689163..7544ab1d1 100644 --- a/indra/llcommon/llkeythrottle.h +++ b/indra/llcommon/llkeythrottle.h @@ -174,6 +174,7 @@ public: F64 averageCount = curr.count + prevCount * (1.0 - timeInCurrent); return averageCount; } + // call each time the key wants use State noteAction(const T& id, S32 weight = 1) { diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h index 06af6dd29..42aaad985 100644 --- a/indra/llcommon/lllslconstants.h +++ b/indra/llcommon/lllslconstants.h @@ -73,6 +73,15 @@ const S32 LSL_PRIM_TEXGEN = 22; const S32 LSL_PRIM_POINT_LIGHT = 23; const S32 LSL_PRIM_CAST_SHADOWS = 24; const S32 LSL_PRIM_GLOW = 25; +const S32 LSL_PRIM_TEXT = 26; +const S32 LSL_PRIM_NAME = 27; +const S32 LSL_PRIM_DESC = 28; +const S32 LSL_PRIM_ROT_LOCAL = 29; +const S32 LSL_PRIM_PHYSICS_SHAPE_TYPE = 30; +const S32 LSL_PRIM_OMEGA = 32; +const S32 LSL_PRIM_POS_LOCAL = 33; +const S32 LSL_PRIM_LINK_TARGET = 34; +const S32 LSL_PRIM_SLICE = 35; const S32 LSL_PRIM_TYPE_BOX = 0; const S32 LSL_PRIM_TYPE_CYLINDER= 1; @@ -132,6 +141,15 @@ const S32 LSL_PRIM_SCULPT_TYPE_MASK = 7; const S32 LSL_PRIM_SCULPT_FLAG_INVERT = 64; const S32 LSL_PRIM_SCULPT_FLAG_MIRROR = 128; +const S32 LSL_PRIM_PHYSICS_SHAPE_PRIM = 0; +const S32 LSL_PRIM_PHYSICS_SHAPE_NONE = 1; +const S32 LSL_PRIM_PHYSICS_SHAPE_CONVEX = 2; + +const S32 LSL_DENSITY = 1; +const S32 LSL_FRICTION = 2; +const S32 LSL_RESTITUTION = 4; +const S32 LSL_GRAVITY_MULTIPLIER = 8; + const S32 LSL_ALL_SIDES = -1; const S32 LSL_LINK_ROOT = 1; const S32 LSL_LINK_FIRST_CHILD = 2; @@ -189,6 +207,13 @@ const S32 OBJECT_RUNNING_SCRIPT_COUNT = 9; const S32 OBJECT_TOTAL_SCRIPT_COUNT = 10; const S32 OBJECT_SCRIPT_MEMORY = 11; const S32 OBJECT_SCRIPT_TIME = 12; +const S32 OBJECT_PRIM_EQUIVALENCE = 13; +const S32 OBJECT_SERVER_COST = 14; +const S32 OBJECT_STREAMING_COST = 15; +const S32 OBJECT_PHYSICS_COST = 16; + +// llTextBox() magic token string - yes it's a hack. +char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!"; // changed() event flags const U32 CHANGED_NONE = 0x0; @@ -216,4 +241,156 @@ const U32 LSL_STATUS_INTERNAL_ERROR = 1999; // Start per-function errors below, starting at 2000: const U32 LSL_STATUS_WHITELIST_FAILED = 2001; + +// Memory profiling support +const S32 LSL_PROFILE_SCRIPT_NONE = 0; +const S32 LSL_PROFILE_SCRIPT_MEMORY = 1; + +// HTTP responses contents type +const S32 LSL_CONTENT_TYPE_TEXT = 0; +const S32 LSL_CONTENT_TYPE_HTML = 1; + +// Ray casting +const S32 LSL_RCERR_UNKNOWN = -1; +const S32 LSL_RCERR_SIM_PERF_LOW = -2; +const S32 LSL_RCERR_CAST_TIME_EXCEEDED = -3; + +const S32 LSL_RC_REJECT_TYPES = 0; +const S32 LSL_RC_DETECT_PHANTOM = 1; +const S32 LSL_RC_DATA_FLAGS = 2; +const S32 LSL_RC_MAX_HITS = 3; + +const S32 LSL_RC_REJECT_AGENTS = 1; +const S32 LSL_RC_REJECT_PHYSICAL = 2; +const S32 LSL_RC_REJECT_NONPHYSICAL = 4; +const S32 LSL_RC_REJECT_LAND = 8; + +const S32 LSL_RC_GET_NORMAL = 1; +const S32 LSL_RC_GET_ROOT_KEY = 2; +const S32 LSL_RC_GET_LINK_NUM = 4; + +// Estate management +const S32 LSL_ESTATE_ACCESS_ALLOWED_AGENT_ADD = 4; +const S32 LSL_ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 8; +const S32 LSL_ESTATE_ACCESS_ALLOWED_GROUP_ADD = 16; +const S32 LSL_ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 32; +const S32 LSL_ESTATE_ACCESS_BANNED_AGENT_ADD = 64; +const S32 LSL_ESTATE_ACCESS_BANNED_AGENT_REMOVE = 128; + +// Key Frame Motion: +const S32 LSL_KFM_COMMAND = 0; +const S32 LSL_KFM_MODE = 1; +const S32 LSL_KFM_DATA = 2; +const S32 LSL_KFM_FORWARD = 0; +const S32 LSL_KFM_LOOP = 1; +const S32 LSL_KFM_PING_PONG = 2; +const S32 LSL_KFM_REVERSE = 3; +const S32 LSL_KFM_ROTATION = 1; +const S32 LSL_KFM_TRANSLATION = 2; +const S32 LSL_KFM_CMD_PLAY = 0; +const S32 LSL_KFM_CMD_STOP = 1; +const S32 LSL_KFM_CMD_PAUSE = 2; + +// Second Life Server/12 12.04.30.255166 constants for llGetAgentList +const S32 AGENT_LIST_PARCEL = 1; +const S32 AGENT_LIST_PARCEL_OWNER = 2; +const S32 AGENT_LIST_REGION = 4; + + +// --- SL Constants ABOVE this line --- +// --- OpenSim / Aurora-Sim constants Below --- +// OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs) +// Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs) +const S32 CHANGED_ANIMATION = 16384; +const S32 PARCEL_DETAILS_CLAIMDATE = 10; // used by OpenSim osSetParcelDetails +const S32 STATS_TIME_DILATION = 0; +const S32 STATS_SIM_FPS = 1; +const S32 STATS_PHYSICS_FPS = 2; +const S32 STATS_AGENT_UPDATES = 3; +const S32 STATS_ROOT_AGENTS = 4; +const S32 STATS_CHILD_AGENTS = 5; +const S32 STATS_TOTAL_PRIMS = 6; +const S32 STATS_ACTIVE_PRIMS = 7; +const S32 STATS_FRAME_MS = 8; +const S32 STATS_NET_MS = 9; +const S32 STATS_PHYSICS_MS = 10; +const S32 STATS_IMAGE_MS = 11; +const S32 STATS_OTHER_MS = 12; +const S32 STATS_IN_PACKETS_PER_SECOND = 13; +const S32 STATS_OUT_PACKETS_PER_SECOND = 14; +const S32 STATS_UNACKED_BYTES = 15; +const S32 STATS_AGENT_MS = 16; +const S32 STATS_PENDING_DOWNLOADS = 17; +const S32 STATS_PENDING_UPLOADS = 18; +const S32 STATS_ACTIVE_SCRIPTS = 19; +const S32 STATS_SCRIPT_LPS = 20; +// osNPC +const S32 OS_NPC_FLY = 0; +const S32 OS_NPC_NO_FLY = 1; +const S32 OS_NPC_LAND_AT_TARGET = 2; +const S32 OS_NPC_SIT_NOW = 0; +const U32 OS_NPC_CREATOR_OWNED = 0x1; +const U32 OS_NPC_NOT_OWNED = 0x2; +const U32 OS_NPC_SENSE_AS_AGENT = 0x4; +const U32 OS_NPC_RUNNING = 4; +// Lightshare / Windlight +const S32 WL_WATER_COLOR = 0; +const S32 WL_WATER_FOG_DENSITY_EXPONENT = 1; +const S32 WL_UNDERWATER_FOG_MODIFIER = 2; +const S32 WL_REFLECTION_WAVELET_SCALE = 3; +const S32 WL_FRESNEL_SCALE = 4; +const S32 WL_FRESNEL_OFFSET = 5; +const S32 WL_REFRACT_SCALE_ABOVE = 6; +const S32 WL_REFRACT_SCALE_BELOW = 7; +const S32 WL_BLUR_MULTIPLIER = 8; +const S32 WL_BIG_WAVE_DIRECTION = 9; +const S32 WL_LITTLE_WAVE_DIRECTION = 10; +const S32 WL_NORMAL_MAP_TEXTURE = 11; +const S32 WL_HORIZON = 12; +const S32 WL_HAZE_HORIZON = 13; +const S32 WL_BLUE_DENSITY = 14; +const S32 WL_HAZE_DENSITY = 15; +const S32 WL_DENSITY_MULTIPLIER = 16; +const S32 WL_DISTANCE_MULTIPLIER = 17; +const S32 WL_MAX_ALTITUDE = 18; +const S32 WL_SUN_MOON_COLOR = 19; +const S32 WL_AMBIENT = 20; +const S32 WL_EAST_ANGLE = 21; +const S32 WL_SUN_GLOW_FOCUS = 22; +const S32 WL_SUN_GLOW_SIZE = 23; +const S32 WL_SCENE_GAMMA = 24; +const S32 WL_STAR_BRIGHTNESS = 25; +const S32 WL_CLOUD_COLOR = 26; +const S32 WL_CLOUD_XY_DENSITY = 27; +const S32 WL_CLOUD_COVERAGE = 28; +const S32 WL_CLOUD_SCALE = 29; +const S32 WL_CLOUD_DETAIL_XY_DENSITY = 30; +const S32 WL_CLOUD_SCROLL_X = 31; +const S32 WL_CLOUD_SCROLL_Y = 32; +const S32 WL_CLOUD_SCROLL_Y_LOCK = 33; +const S32 WL_CLOUD_SCROLL_X_LOCK = 34; +const S32 WL_DRAW_CLASSIC_CLOUDS = 35; +const S32 WL_SUN_MOON_POSITION = 36; +// Aurora-Sim Constants (\Aurora\AuroraDotNetEngine\APIs\AA_Constants.cs) --> +const S32 BOT_FOLLOW_FLAG_NONE = 0; +const S32 BOT_FOLLOW_FLAG_INDEFINITELY = 1; +const S32 BOT_FOLLOW_WALK = 0; +const S32 BOT_FOLLOW_RUN = 1; +const S32 BOT_FOLLOW_FLY = 2; +const S32 BOT_FOLLOW_TELEPORT = 3; +const S32 BOT_FOLLOW_WAIT = 4; +const S32 BOT_FOLLOW_TRIGGER_HERE_EVENT = 1; +const S32 BOT_FOLLOW_FLAG_FORCEDIRECTPATH = 4; +// string constants from Aurora-Sim +char const* const ENABLE_GRAVITY = "enable_gravity"; +char const* const GRAVITY_FORCE_X = "gravity_force_x"; +char const* const GRAVITY_FORCE_Y = "gravity_force_y"; +char const* const GRAVITY_FORCE_Z = "gravity_force_z"; +char const* const ADD_GRAVITY_POINT = "add_gravity_point"; +char const* const ADD_GRAVITY_FORCE = "add_gravity_force"; +char const* const START_TIME_REVERSAL_SAVING = "start_time_reversal_saving"; +char const* const STOP_TIME_REVERSAL_SAVING = "stop_time_reversal_saving"; +char const* const START_TIME_REVERSAL = "start_time_reversal"; +char const* const STOP_TIME_REVERSAL = "stop_time_reversal"; + #endif diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index dee0d50e1..9532410b7 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -376,24 +376,24 @@ private: // uses the MSVC compiler intrinsics __cpuid() and __rdtsc(). // Delays for the specified amount of milliseconds -static void _Delay(unsigned int ms) +static void _Delay(unsigned int ms) { - LARGE_INTEGER freq, c1, c2; - __int64 x; + LARGE_INTEGER freq, c1, c2; + __int64 x; - // Get High-Res Timer frequency + // Get High-Res Timer frequency if (!QueryPerformanceFrequency(&freq)) return; - + // Convert ms to High-Res Timer value x = freq.QuadPart/1000*ms; - // Get first snapshot of High-Res Timer value + // Get first snapshot of High-Res Timer value QueryPerformanceCounter(&c1); do { - // Get second snapshot - QueryPerformanceCounter(&c2); + // Get second snapshot + QueryPerformanceCounter(&c2); }while(c2.QuadPart-c1.QuadPart < x); // Loop while (second-first < x) } diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h index 00cd5a555..fc2c8dacf 100644 --- a/indra/llcommon/llprocessor.h +++ b/indra/llcommon/llprocessor.h @@ -52,5 +52,4 @@ private: LLProcessorInfoImpl* mImpl; }; - -#endif +#endif // LLPROCESSOR_H diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 18842f276..105b69d34 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -39,7 +39,7 @@ #include #include #include -#include "stdtypes.h" // llcommon/stdtypes.h, needed for S32 and U32. +#include // Use to compare the first element only of a pair // e.g. typedef std::set, compare_pair > some_pair_set_t; @@ -477,4 +477,54 @@ llbind2nd(const _Operation& __oper, const _Tp& __x) return llbinder2nd<_Operation>(__oper, _Arg2_type(__x)); } +/** + * Compare std::type_info* pointers a la std::less. We break this out as a + * separate function for use in two different std::less specializations. + */ +inline +bool before(const std::type_info* lhs, const std::type_info* rhs) +{ +#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) + // If we're building on Linux with gcc, and it's either gcc 3.x or + // 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on + // Mac too, and some people build with gcc on Windows (cygwin or mingw). + // On Linux, different load modules may produce different type_info* + // pointers for the same type. Have to compare name strings to get good + // results. + return strcmp(lhs->name(), rhs->name()) < 0; +#else // not Linux, or gcc 4.4+ + // Just use before(), as we normally would + return lhs->before(*rhs); +#endif +} + +/** + * Specialize std::less to use std::type_info::before(). + * See MAINT-1175. It is NEVER a good idea to directly compare std::type_info* + * because, on Linux, you might get different std::type_info* pointers for the + * same type (from different load modules)! + */ +namespace std +{ + template <> + struct less: + public std::binary_function + { + bool operator()(const std::type_info* lhs, const std::type_info* rhs) const + { + return before(lhs, rhs); + } + }; + + template <> + struct less: + public std::binary_function + { + bool operator()(std::type_info* lhs, std::type_info* rhs) const + { + return before(lhs, rhs); + } + }; +} // std + #endif // LL_LLSTL_H diff --git a/indra/llcommon/lltypeinfolookup.h b/indra/llcommon/lltypeinfolookup.h index 7510cc12e..0b6862444 100644 --- a/indra/llcommon/lltypeinfolookup.h +++ b/indra/llcommon/lltypeinfolookup.h @@ -12,9 +12,49 @@ #if ! defined(LL_LLTYPEINFOLOOKUP_H) #define LL_LLTYPEINFOLOOKUP_H -#include "llsortedvector.h" +#include +#include +#include +#include // std::binary_function #include +/** + * The following helper classes are based on the Boost.Unordered documentation: + * http://www.boost.org/doc/libs/1_45_0/doc/html/unordered/hash_equality.html + */ + +/** + * Compute hash for a string passed as const char* + */ +struct const_char_star_hash: public std::unary_function +{ + std::size_t operator()(const char* str) const + { + std::size_t seed = 0; + for ( ; *str; ++str) + { + boost::hash_combine(seed, *str); + } + return seed; + } +}; + +/** + * Compute equality for strings passed as const char* + * + * I (nat) suspect that this is where the default behavior breaks for the + * const char* values returned from std::type_info::name(). If you compare the + * two const char* pointer values, as a naive, unspecialized implementation + * will surely do, they'll compare unequal. + */ +struct const_char_star_equal: public std::binary_function +{ + bool operator()(const char* lhs, const char* rhs) const + { + return strcmp(lhs, rhs) == 0; + } +}; + /** * LLTypeInfoLookup is specifically designed for use cases for which you might * consider std::map. We have several such data @@ -23,88 +63,55 @@ * different load modules will produce different std::type_info*. * LLTypeInfoLookup contains a workaround to address this issue. * - * Specifically, when we don't find the passed std::type_info*, - * LLTypeInfoLookup performs a linear search over registered entries to - * compare name() strings. Presuming that this succeeds, we cache the new - * (previously unrecognized) std::type_info* to speed future lookups. - * - * This worst-case fallback search (linear search with string comparison) - * should only happen the first time we look up a given type from a particular - * load module other than the one from which we initially registered types. - * (However, a lookup which wouldn't succeed anyway will always have - * worst-case performance.) This class is probably best used with less than a - * few dozen different types. + * The API deliberately diverges from std::map in several respects: + * * It avoids iterators, not only begin()/end() but also as return values + * from insert() and find(). This bypasses transform_iterator overhead. + * * Since we literally use compile-time types as keys, the essential insert() + * and find() methods accept the key type as a @em template parameter, + * accepting and returning value_type as a normal runtime value. This is to + * permit future optimization (e.g. compile-time type hashing) without + * changing the API. */ template class LLTypeInfoLookup { + // Use this for our underlying implementation: lookup by + // std::type_info::name() string. This is one of the rare cases in which I + // dare use const char* directly, rather than std::string, because I'm + // sure that every value returned by std::type_info::name() is static. + // HOWEVER, specify our own hash + equality functors: naively comparing + // distinct const char* values won't work. + typedef boost::unordered_map impl_map_type; + public: - typedef LLTypeInfoLookup self; - typedef LLSortedVector vector_type; - typedef typename vector_type::key_type key_type; - typedef typename vector_type::mapped_type mapped_type; - typedef typename vector_type::value_type value_type; - typedef typename vector_type::iterator iterator; - typedef typename vector_type::const_iterator const_iterator; + typedef VALUE value_type; LLTypeInfoLookup() {} - iterator begin() { return mVector.begin(); } - iterator end() { return mVector.end(); } - const_iterator begin() const { return mVector.begin(); } - const_iterator end() const { return mVector.end(); } - bool empty() const { return mVector.empty(); } - std::size_t size() const { return mVector.size(); } + bool empty() const { return mMap.empty(); } + std::size_t size() const { return mMap.size(); } - std::pair insert(const std::type_info* key, const VALUE& value) + template + bool insert(const value_type& value) { - return insert(value_type(key, value)); + // Obtain and store the std::type_info::name() string as the key. + // Return just the bool from std::map::insert()'s return pair. + return mMap.insert(typename impl_map_type::value_type(typeid(KEY).name(), value)).second; } - std::pair insert(const value_type& pair) + template + boost::optional find() const { - return mVector.insert(pair); - } - - // const find() forwards to non-const find(): this can alter mVector! - const_iterator find(const std::type_info* key) const - { - return const_cast(this)->find(key); - } - - // non-const find() caches previously-unknown type_info* to speed future - // lookups. - iterator find(const std::type_info* key) - { - iterator found = mVector.find(key); - if (found != mVector.end()) - { - // If LLSortedVector::find() found, great, we're done. - return found; - } - // Here we didn't find the passed type_info*. On Linux, though, even - // for the same type, typeid(sametype) produces a different type_info* - // when used in different load modules. So the fact that we didn't - // find the type_info* we seek doesn't mean this type isn't - // registered. Scan for matching name() string. - for (typename vector_type::iterator ti(mVector.begin()), tend(mVector.end()); - ti != tend; ++ti) - { - if (std::string(ti->first->name()) == key->name()) - { - // This unrecognized 'key' is for the same type as ti->first. - // To speed future lookups, insert a new entry that lets us - // look up ti->second using this same 'key'. - return insert(key, ti->second).first; - } - } - // We simply have never seen a type with this type_info* from any load - // module. - return mVector.end(); + // Use the std::type_info::name() string as the key. + typename impl_map_type::const_iterator found = mMap.find(typeid(KEY).name()); + if (found == mMap.end()) + return boost::optional(); + return found->second; } private: - vector_type mVector; + impl_map_type mMap; }; #endif /* ! defined(LL_LLTYPEINFOLOOKUP_H) */ diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index 74874585c..38084811b 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -33,9 +33,9 @@ // We can't use WIN32_LEAN_AND_MEAN here, needs lots of includes. #if LL_WINDOWS -# undef WIN32_LEAN_AND_MEAN -# include -# include +#undef WIN32_LEAN_AND_MEAN +#include +#include #endif #include "lldefs.h" @@ -452,7 +452,8 @@ static void get_random_bytes(void *buf, int nbytes) return; } -#if LL_WINDOWS +#if LL_WINDOWS + typedef struct _ASTAT_ { ADAPTER_STATUS adapt; @@ -460,58 +461,44 @@ typedef struct _ASTAT_ }ASTAT, * PASTAT; // static -S32 LLUUID::getNodeID(unsigned char *node_id) +S32 LLUUID::getNodeID(unsigned char *node_id) { - ASTAT Adapter; - NCB Ncb; - UCHAR uRetCode; - LANA_ENUM lenum; - int i; - int retval = 0; + ASTAT Adapter; + NCB Ncb; + UCHAR uRetCode; + LANA_ENUM lenum; + int i; + int retval = 0; - memset( &Ncb, 0, sizeof(Ncb) ); - Ncb.ncb_command = NCBENUM; - Ncb.ncb_buffer = (UCHAR *)&lenum; - Ncb.ncb_length = sizeof(lenum); - uRetCode = Netbios( &Ncb ); - // printf( "The NCBENUM return code is: 0x%x \n", uRetCode ); + memset( &Ncb, 0, sizeof(Ncb) ); + Ncb.ncb_command = NCBENUM; + Ncb.ncb_buffer = (UCHAR *)&lenum; + Ncb.ncb_length = sizeof(lenum); + uRetCode = Netbios( &Ncb ); - for(i=0; i < lenum.length ;i++) - { - memset( &Ncb, 0, sizeof(Ncb) ); - Ncb.ncb_command = NCBRESET; - Ncb.ncb_lana_num = lenum.lana[i]; + for(i=0; i < lenum.length ;i++) + { + memset( &Ncb, 0, sizeof(Ncb) ); + Ncb.ncb_command = NCBRESET; + Ncb.ncb_lana_num = lenum.lana[i]; - uRetCode = Netbios( &Ncb ); - // printf( "The NCBRESET on LANA %d return code is: 0x%x \n", - // lenum.lana[i], uRetCode ); + uRetCode = Netbios( &Ncb ); - memset( &Ncb, 0, sizeof (Ncb) ); - Ncb.ncb_command = NCBASTAT; - Ncb.ncb_lana_num = lenum.lana[i]; + memset( &Ncb, 0, sizeof (Ncb) ); + Ncb.ncb_command = NCBASTAT; + Ncb.ncb_lana_num = lenum.lana[i]; - strcpy( (char *)Ncb.ncb_callname, "* " ); /* Flawfinder: ignore */ - Ncb.ncb_buffer = (unsigned char *)&Adapter; - Ncb.ncb_length = sizeof(Adapter); + strcpy( (char *)Ncb.ncb_callname, "* " ); /* Flawfinder: ignore */ + Ncb.ncb_buffer = (unsigned char *)&Adapter; + Ncb.ncb_length = sizeof(Adapter); - uRetCode = Netbios( &Ncb ); -// printf( "The NCBASTAT on LANA %d return code is: 0x%x \n", -// lenum.lana[i], uRetCode ); - if ( uRetCode == 0 ) - { -// printf( "The Ethernet Number on LANA %d is: %02x%02x%02x%02x%02x%02x\n", -// lenum.lana[i], -// Adapter.adapt.adapter_address[0], -// Adapter.adapt.adapter_address[1], -// Adapter.adapt.adapter_address[2], -// Adapter.adapt.adapter_address[3], -// Adapter.adapt.adapter_address[4], -// Adapter.adapt.adapter_address[5] ); + uRetCode = Netbios( &Ncb ); + if ( uRetCode == 0 ) + { memcpy(node_id,Adapter.adapt.adapter_address,6); /* Flawfinder: ignore */ retval = 1; - - } - } + } + } return retval; } diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index d7ded1a26..3a0d66e4a 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -132,6 +132,7 @@ public: U8 mData[UUID_BYTES]; }; + typedef std::vector uuid_vec_t; // Construct diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index b58d0c95f..4ad2a3fef 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -239,7 +239,7 @@ public: std::string getHoverText() const { return mHoverText; }; std::string getHoverLink() const { return mHoverLink; }; - std::string getMediaName() const { return mMediaName; }; + const std::string& getMediaName() const { return mMediaName; }; std::string getMediaDescription() const { return mMediaDescription; }; // Crash the plugin. If you use this outside of a testbed, you will be punished. diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index cf3036edc..846badc60 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -571,7 +571,7 @@ void LLPostProcess::setSelectedEffectValue(std::string const & setting, LLSD& va S32 elem=0; if(sscanf(setting.c_str(),"%255[^[][%d]", buf, &elem) == 2) { - mSelectedEffectInfo[(char*)buf][elem] = value; + mSelectedEffectInfo[std::string(buf)][elem] = value; } else { diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 14d391f71..ee2ad2d3e 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -478,7 +478,7 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); // Display mToolTipMsg if no child handles it. - /*virtual*/ const std::string& getName() const; + /*virtual*/ const std::string& getName() const; /*virtual*/ void onMouseCaptureLost(); /*virtual*/ BOOL hasMouseCapture(); /*virtual*/ BOOL isView(); // Hack to support LLFocusMgr diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index aeb976399..60245757a 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -254,6 +254,10 @@ extern "C" { int yyerror(const char *fmt, ...); } "OBJECT_TOTAL_SCRIPT_COUNT" { count(); yylval.ival = OBJECT_TOTAL_SCRIPT_COUNT; return(INTEGER_CONSTANT); } "OBJECT_SCRIPT_MEMORY" { count(); yylval.ival = OBJECT_SCRIPT_MEMORY; return(INTEGER_CONSTANT); } "OBJECT_SCRIPT_TIME" { count(); yylval.ival = OBJECT_SCRIPT_TIME; return(INTEGER_CONSTANT); } +"OBJECT_PRIM_EQUIVALENCE" { count(); yylval.ival = OBJECT_PRIM_EQUIVALENCE; return(INTEGER_CONSTANT); } +"OBJECT_SERVER_COST" { count(); yylval.ival = OBJECT_SERVER_COST; return(INTEGER_CONSTANT); } +"OBJECT_STREAMING_COST" { count(); yylval.ival = OBJECT_STREAMING_COST; return(INTEGER_CONSTANT); } +"OBJECT_PHYSICS_COST" { count(); yylval.ival = OBJECT_SCRIPT_TIME; return(INTEGER_CONSTANT); } "TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); } "TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); } @@ -347,7 +351,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "REMOTE_DATA_REQUEST" { count(); yylval.ival = LSL_REMOTE_DATA_REQUEST; return(INTEGER_CONSTANT); } "REMOTE_DATA_REPLY" { count(); yylval.ival = LSL_REMOTE_DATA_REPLY; return(INTEGER_CONSTANT); } - "PSYS_PART_FLAGS" { count(); yylval.ival = LLPS_PART_FLAGS; return(INTEGER_CONSTANT); } "PSYS_PART_START_COLOR" { count(); yylval.ival = LLPS_PART_START_COLOR; return (INTEGER_CONSTANT); } "PSYS_PART_START_ALPHA" { count(); yylval.ival = LLPS_PART_START_ALPHA; return (INTEGER_CONSTANT); } @@ -357,7 +360,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "PSYS_PART_END_SCALE" { count(); yylval.ival = LLPS_PART_END_SCALE; return (INTEGER_CONSTANT); } "PSYS_PART_MAX_AGE" { count(); yylval.ival = LLPS_PART_MAX_AGE; return (INTEGER_CONSTANT); } - "PSYS_PART_WIND_MASK" { count(); yylval.ival = LLPartData::LL_PART_WIND_MASK; return(INTEGER_CONSTANT); } "PSYS_PART_INTERP_COLOR_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_COLOR_MASK; return(INTEGER_CONSTANT); } "PSYS_PART_INTERP_SCALE_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_SCALE_MASK; return(INTEGER_CONSTANT); } @@ -368,7 +370,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "PSYS_PART_EMISSIVE_MASK" { count(); yylval.ival = LLPartData::LL_PART_EMISSIVE_MASK; return(INTEGER_CONSTANT); } "PSYS_PART_TARGET_LINEAR_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_LINEAR_MASK; return(INTEGER_CONSTANT); } - "PSYS_SRC_MAX_AGE" { count(); yylval.ival = LLPS_SRC_MAX_AGE; return(INTEGER_CONSTANT); } "PSYS_SRC_PATTERN" { count(); yylval.ival = LLPS_SRC_PATTERN; return(INTEGER_CONSTANT); } "PSYS_SRC_INNERANGLE" { count(); yylval.ival = LLPS_SRC_INNERANGLE; return(INTEGER_CONSTANT); } @@ -393,7 +394,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "PSYS_SRC_PATTERN_ANGLE_CONE" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; return(INTEGER_CONSTANT); } "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY; return(INTEGER_CONSTANT); } - "VEHICLE_TYPE_NONE" { count(); yylval.ival = VEHICLE_TYPE_NONE; return(INTEGER_CONSTANT); } "VEHICLE_TYPE_SLED" { count(); yylval.ival = VEHICLE_TYPE_SLED; return(INTEGER_CONSTANT); } "VEHICLE_TYPE_CAR" { count(); yylval.ival = VEHICLE_TYPE_CAR; return(INTEGER_CONSTANT); } @@ -408,8 +408,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "VEHICLE_ANGULAR_MOTOR_DIRECTION" { count(); yylval.ival = VEHICLE_ANGULAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); } "VEHICLE_LINEAR_MOTOR_OFFSET" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_OFFSET; return(INTEGER_CONSTANT); } - - "VEHICLE_HOVER_HEIGHT" { count(); yylval.ival = VEHICLE_HOVER_HEIGHT; return(INTEGER_CONSTANT); } "VEHICLE_HOVER_EFFICIENCY" { count(); yylval.ival = VEHICLE_HOVER_EFFICIENCY; return(INTEGER_CONSTANT); } "VEHICLE_HOVER_TIMESCALE" { count(); yylval.ival = VEHICLE_HOVER_TIMESCALE; return(INTEGER_CONSTANT); } @@ -444,8 +442,6 @@ extern "C" { int yyerror(const char *fmt, ...); } "VEHICLE_FLAG_MOUSELOOK_BANK" { count(); yylval.ival = VEHICLE_FLAG_MOUSELOOK_BANK; return(INTEGER_CONSTANT); } "VEHICLE_FLAG_CAMERA_DECOUPLED" { count(); yylval.ival = VEHICLE_FLAG_CAMERA_DECOUPLED; return(INTEGER_CONSTANT); } - - "PRIM_TYPE" { count(); yylval.ival = LSL_PRIM_TYPE; return(INTEGER_CONSTANT); } "PRIM_MATERIAL" { count(); yylval.ival = LSL_PRIM_MATERIAL; return(INTEGER_CONSTANT); } "PRIM_PHYSICS" { count(); yylval.ival = LSL_PRIM_PHYSICS; return(INTEGER_CONSTANT); } @@ -463,6 +459,15 @@ extern "C" { int yyerror(const char *fmt, ...); } "PRIM_FULLBRIGHT" { count(); yylval.ival = LSL_PRIM_FULLBRIGHT; return(INTEGER_CONSTANT); } "PRIM_TEXGEN" { count(); yylval.ival = LSL_PRIM_TEXGEN; return(INTEGER_CONSTANT); } "PRIM_GLOW" { count(); yylval.ival = LSL_PRIM_GLOW; return(INTEGER_CONSTANT); } +"PRIM_TEXT" { count(); yylval.ival = LSL_PRIM_TEXT; return(INTEGER_CONSTANT); } +"PRIM_NAME" { count(); yylval.ival = LSL_PRIM_NAME; return(INTEGER_CONSTANT); } +"PRIM_DESC" { count(); yylval.ival = LSL_PRIM_DESC; return(INTEGER_CONSTANT); } +"PRIM_ROT_LOCAL" { count(); yylval.ival = LSL_PRIM_ROT_LOCAL; return(INTEGER_CONSTANT); } +"PRIM_PHYSICS_SHAPE_TYPE" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_TYPE; return(INTEGER_CONSTANT); } +"PRIM_OMEGA" { count(); yylval.ival = LSL_PRIM_OMEGA; return(INTEGER_CONSTANT); } +"PRIM_POS_LOCAL" { count(); yylval.ival = LSL_PRIM_POS_LOCAL; return(INTEGER_CONSTANT); } +"PRIM_LINK_TARGET" { count(); yylval.ival = LSL_PRIM_LINK_TARGET; return(INTEGER_CONSTANT); } +"PRIM_SLICE" { count(); yylval.ival = LSL_PRIM_SLICE; return(INTEGER_CONSTANT); } "PRIM_TYPE_BOX" { count(); yylval.ival = LSL_PRIM_TYPE_BOX; return(INTEGER_CONSTANT); } "PRIM_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_TYPE_CYLINDER; return(INTEGER_CONSTANT); } @@ -522,6 +527,15 @@ extern "C" { int yyerror(const char *fmt, ...); } "PRIM_SCULPT_FLAG_MIRROR" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_MIRROR; return(INTEGER_CONSTANT); } "PRIM_SCULPT_FLAG_INVERT" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_INVERT; return(INTEGER_CONSTANT); } +"PRIM_PHYSICS_SHAPE_PRIM" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_PRIM; return(INTEGER_CONSTANT); } +"PRIM_PHYSICS_SHAPE_NONE" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_NONE; return(INTEGER_CONSTANT); } +"PRIM_PHYSICS_SHAPE_CONVEX" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_CONVEX; return(INTEGER_CONSTANT); } + +"DENSITY" { count(); yylval.ival = LSL_DENSITY; return(INTEGER_CONSTANT); } +"FRICTION" { count(); yylval.ival = LSL_FRICTION; return(INTEGER_CONSTANT); } +"RESTITUTION" { count(); yylval.ival = LSL_RESTITUTION; return(INTEGER_CONSTANT); } +"GRAVITY_MULTIPLIER" { count(); yylval.ival = LSL_GRAVITY_MULTIPLIER; return(INTEGER_CONSTANT); } + "MASK_BASE" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); } "MASK_OWNER" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); } "MASK_GROUP" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); } @@ -595,6 +609,7 @@ extern "C" { int yyerror(const char *fmt, ...); } "HTTP_BODY_MAXLENGTH" { count(); yylval.ival = HTTP_BODY_MAXLENGTH; return(INTEGER_CONSTANT); } "HTTP_BODY_TRUNCATED" { count(); yylval.ival = HTTP_BODY_TRUNCATED; return(INTEGER_CONSTANT); } "HTTP_VERIFY_CERT" { count(); yylval.ival = HTTP_VERIFY_CERT; return(INTEGER_CONSTANT); } +"HTTP_VERBOSE_THROTTLE" { count(); yylval.ival = HTTP_VERBOSE_THROTTLE; return(INTEGER_CONSTANT); } "PARCEL_COUNT_TOTAL" { count(); yylval.ival = OC_TOTAL; return(INTEGER_CONSTANT); } "PARCEL_COUNT_OWNER" { count(); yylval.ival = OC_OWNER; return(INTEGER_CONSTANT); } @@ -675,6 +690,54 @@ extern "C" { int yyerror(const char *fmt, ...); } "STATUS_INTERNAL_ERROR" { count(); yylval.ival = LSL_STATUS_INTERNAL_ERROR; return(INTEGER_CONSTANT); } "STATUS_WHITELIST_FAILED" { count(); yylval.ival = LSL_STATUS_WHITELIST_FAILED; return(INTEGER_CONSTANT); } +"PROFILE_SCRIPT_NONE" { count(); yylval.ival = LSL_PROFILE_SCRIPT_NONE; return(INTEGER_CONSTANT); } +"PROFILE_SCRIPT_MEMORY" { count(); yylval.ival = LSL_PROFILE_SCRIPT_MEMORY; return(INTEGER_CONSTANT); } + +"CONTENT_TYPE_TEXT" { count(); yylval.ival = LSL_CONTENT_TYPE_TEXT; return(INTEGER_CONSTANT); } +"CONTENT_TYPE_HTML" { count(); yylval.ival = LSL_CONTENT_TYPE_HTML; return(INTEGER_CONSTANT); } + +"RCERR_UNKNOWN" { count(); yylval.ival = LSL_RCERR_UNKNOWN; return(INTEGER_CONSTANT); } +"RCERR_SIM_PERF_LOW" { count(); yylval.ival = LSL_RCERR_SIM_PERF_LOW; return(INTEGER_CONSTANT); } +"RCERR_CAST_TIME_EXCEEDED" { count(); yylval.ival = LSL_RCERR_CAST_TIME_EXCEEDED; return(INTEGER_CONSTANT); } + +"RC_REJECT_TYPES" { count(); yylval.ival = LSL_RC_REJECT_TYPES; return(INTEGER_CONSTANT); } +"RC_DETECT_PHANTOM" { count(); yylval.ival = LSL_RC_DETECT_PHANTOM; return(INTEGER_CONSTANT); } +"RC_DATA_FLAGS" { count(); yylval.ival = LSL_RC_DATA_FLAGS; return(INTEGER_CONSTANT); } +"RC_MAX_HITS" { count(); yylval.ival = LSL_RC_MAX_HITS; return(INTEGER_CONSTANT); } + +"RC_REJECT_AGENTS" { count(); yylval.ival = LSL_RC_REJECT_AGENTS; return(INTEGER_CONSTANT); } +"RC_REJECT_PHYSICAL" { count(); yylval.ival = LSL_RC_REJECT_PHYSICAL; return(INTEGER_CONSTANT); } +"RC_REJECT_NONPHYSICAL" { count(); yylval.ival = LSL_RC_REJECT_NONPHYSICAL; return(INTEGER_CONSTANT); } +"RC_REJECT_LAND" { count(); yylval.ival = LSL_RC_REJECT_LAND; return(INTEGER_CONSTANT); } + +"RC_GET_NORMAL" { count(); yylval.ival = LSL_RC_GET_NORMAL; return(INTEGER_CONSTANT); } +"RC_GET_ROOT_KEY" { count(); yylval.ival = LSL_RC_GET_ROOT_KEY; return(INTEGER_CONSTANT); } +"RC_GET_LINK_NUM" { count(); yylval.ival = LSL_RC_GET_LINK_NUM; return(INTEGER_CONSTANT); } + +"ESTATE_ACCESS_ALLOWED_AGENT_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_AGENT_ADD; return(INTEGER_CONSTANT); } +"ESTATE_ACCESS_ALLOWED_AGENT_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_AGENT_REMOVE; return(INTEGER_CONSTANT); } +"ESTATE_ACCESS_ALLOWED_GROUP_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_GROUP_ADD; return(INTEGER_CONSTANT); } +"ESTATE_ACCESS_ALLOWED_GROUP_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_GROUP_REMOVE; return(INTEGER_CONSTANT); } +"ESTATE_ACCESS_BANNED_AGENT_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_BANNED_AGENT_ADD; return(INTEGER_CONSTANT); } +"ESTATE_ACCESS_BANNED_AGENT_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_BANNED_AGENT_REMOVE; return(INTEGER_CONSTANT); } + +"KFM_COMMAND" { count(); yylval.ival = LSL_KFM_COMMAND; return(INTEGER_CONSTANT); } +"KFM_MODE" { count(); yylval.ival = LSL_KFM_MODE; return(INTEGER_CONSTANT); } +"KFM_DATA" { count(); yylval.ival = LSL_KFM_DATA; return(INTEGER_CONSTANT); } +"KFM_FORWARD" { count(); yylval.ival = LSL_KFM_FORWARD; return(INTEGER_CONSTANT); } +"KFM_LOOP" { count(); yylval.ival = LSL_KFM_LOOP; return(INTEGER_CONSTANT); } +"KFM_PING_PONG" { count(); yylval.ival = LSL_KFM_PING_PONG; return(INTEGER_CONSTANT); } +"KFM_REVERSE" { count(); yylval.ival = LSL_KFM_REVERSE; return(INTEGER_CONSTANT); } +"KFM_ROTATION" { count(); yylval.ival = LSL_KFM_ROTATION; return(INTEGER_CONSTANT); } +"KFM_TRANSLATION" { count(); yylval.ival = LSL_KFM_TRANSLATION; return(INTEGER_CONSTANT); } +"KFM_CMD_PLAY" { count(); yylval.ival = LSL_KFM_CMD_PLAY; return(INTEGER_CONSTANT); } +"KFM_CMD_STOP" { count(); yylval.ival = LSL_KFM_CMD_STOP; return(INTEGER_CONSTANT); } +"KFM_CMD_PAUSE" { count(); yylval.ival = LSL_KFM_CMD_PAUSE; return(INTEGER_CONSTANT); } + +"AGENT_LIST_PARCEL" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); } +"AGENT_LIST_PARCEL_OWNER" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); } +"AGENT_LIST_REGION" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); } + {L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); } {N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } diff --git a/indra/lscript/lscript_http.h b/indra/lscript/lscript_http.h index 86b2d29b9..971ecbae7 100644 --- a/indra/lscript/lscript_http.h +++ b/indra/lscript/lscript_http.h @@ -40,7 +40,8 @@ enum LLScriptHTTPRequestParameterKey HTTP_METHOD, HTTP_MIMETYPE, HTTP_BODY_MAXLENGTH, - HTTP_VERIFY_CERT + HTTP_VERIFY_CERT, + HTTP_VERBOSE_THROTTLE }; enum LLScriptHTTPResponseMetadataKey diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index b4a708f87..4599aa135 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -469,102 +469,109 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "llGetEnv", "s", "s"); addFunction(10.f, 0.f, dummy_func, "llRegionSayTo", NULL, "kis"); + + // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only - // Adding missing (more recent) LSL functions. - - addFunction(10.f, 0.f, dummy_func, "llCastRay", "l", "vvl"); - addFunction(10.f, 0.f, dummy_func, "llGetSPMaxMemory", "i", NULL); - addFunction(10.f, 0.f, dummy_func, "llGetUsedMemory", "i", NULL); - addFunction(10.f, 0.f, dummy_func, "llGodLikeRezObject", NULL, "kv"); - addFunction(10.f, 0.f, dummy_func, "llScriptProfiler", NULL, "i"); - addFunction(10.f, 0.f, dummy_func, "llSetInventoryPermMask", NULL, "sii"); - addFunction(10.f, 0.f, dummy_func, "llSetObjectPermMask", NULL, "ii"); - // Even more recent + // Server v11.08.10.238207 new functions: addFunction(10.f, 0.f, dummy_func, "llSetMemoryLimit", "i", "i"); + addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL); addFunction(10.f, 0.f, dummy_func, "llSetLinkMedia", "i", "iil"); addFunction(10.f, 0.f, dummy_func, "llGetLinkMedia", "l", "iil"); addFunction(10.f, 0.f, dummy_func, "llClearLinkMedia", "i", "ii"); addFunction(10.f, 0.f, dummy_func, "llSetLinkCamera", NULL, "ivv"); addFunction(10.f, 0.f, dummy_func, "llSetContentType", NULL, "ki"); - addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivr"); + addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivq"); addFunction(10.f, 0.f, dummy_func, "llAvatarOnLinkSitTarget", "k", "i"); - addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL); - addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL); - addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL); - addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL); - addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik"); - addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi"); - addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll"); - addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff"); - addFunction(10.f, 0.f, dummy_func, "llSetRegionPos", "i", "v"); addFunction(10.f, 0.f, dummy_func, "llSetVelocity", NULL, "vi"); + // Server v11.09.09.240509 new functions: + addFunction(10.f, 0.f, dummy_func, "llCastRay", "l", "vvl"); + addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL); + addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff"); + addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL); + // Server v11.10.18.243270 new functions: + addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik"); + // Server RC magnum v11.10.31.244254 new function: + addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll"); + // Server RC Le Tigre v11.10.30.245889 new function: addFunction(10.f, 0.f, dummy_func, "llTransferLindenDollars", "k", "ki"); + // llGenerateKey officially implemented now added + addFunction(10.f, 0.f, dummy_func, "llGenerateKey", "k", NULL); - //Pathfinder functions. Current state: alpha, thus subject to change. - //This and the preceding line are to be removed in future revisions of this file. + // Server new function 2011-12-13: + addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL); + + // Missing script functions as of 2011-12-13 + addFunction(10.f, 0.f, dummy_func, "llScriptProfiler", NULL, "i"); + addFunction(10.f, 0.f, dummy_func, "llGetSPMaxMemory", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "llGetUsedMemory", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi"); + + // Server 12.01.24.248357 new functions + addFunction(0.f, 0.f, dummy_func, "llSetRegionPos", "i", "v"); + + // Server 12.04.13.253827 new function + addFunction(0.f, 0.f, dummy_func, "llGetAgentList", "l", "il"); + + // Server RC Magnum 12.05.25.258071 new functions: + addFunction(0.f, 0.f, dummy_func, "llAttachToAvatarTemp", NULL, "i"); + addFunction(0.f, 0.f, dummy_func, "llTeleportAgent", NULL, "ksvv"); + addFunction(0.f, 0.f, dummy_func, "llTeleportAgentGlobalCoords", NULL, "kvvv"); + + // Pathfinding functions addFunction(10.f, 0.f, dummy_func, "llCreateCharacter", NULL, "l"); addFunction(10.f, 0.f, dummy_func, "llDeleteCharacter", NULL, NULL); addFunction(10.f, 0.f, dummy_func, "llEvade", NULL, "kl"); addFunction(10.f, 0.f, dummy_func, "llExecCharacterCmd", NULL, "il"); - addFunction(10.f, 0.f, dummy_func, "llGetClosestNavPoint", "l", "vl"); addFunction(10.f, 0.f, dummy_func, "llFleeFrom", NULL, "vfl"); + addFunction(10.f, 0.f, dummy_func, "llGetClosestNavPoint", NULL, "vl"); + addFunction(10.f, 0.f, dummy_func, "llGetStaticPath", NULL, "vvfl"); addFunction(10.f, 0.f, dummy_func, "llNavigateTo", NULL, "vl"); addFunction(10.f, 0.f, dummy_func, "llPatrolPoints", NULL, "ll"); addFunction(10.f, 0.f, dummy_func, "llPursue", NULL, "kl"); addFunction(10.f, 0.f, dummy_func, "llUpdateCharacter", NULL, "l"); - addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vfl"); + addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vvl"); - - - // REGARDING OSSL FUNCTIONS + // 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.) + // REGARDING NON SL-LSL FUNCTIONS (OSSL, aaFunctions, botFunctions) // These additions should be posted underneath the llFunctions // These functions pertain to OpenSimulator and are in no part applicable to SecondLife by Linden Labs // The Current State of these functions are in flux and development is ongoing. Not all the functions are presently - // documented and therefore the description may be incomplete and require further attention. - // OpenSimulator is written in C# and not CPP therefore some values for example "double = float" etc. are different. - - // OSSL corrections and syntax additions added + set in same order as found in OSSL_stub.cs of OpenSim Source (Updated PM October-21-2010 - // based on OpenSimulator Ver. 0.7.x DEV/Master Git # a7acb650d400a280a7b9edabd304376dff9c81af - a7acb65-r/14142 + // fully documented and therefore the description may be incomplete and require further attention. + // OpenSim & Aurora-Sim are written in C# and not CPP therefore some values for example "double = float" etc. are different. + // + // OSSL corrections and syntax additions added + set initially in same order as found in IOSSL_Api.cs of Aurora-Sim & OpenSim Source + // updates added @ end of each subsection for update timeline maint. // Updates by WhiteStar Magic - - // It should be noted though, that the order of OSSL functions is not important for correct functionality. - - addFunction(10.f, 0.f, dummy_func, "osSetRegionWaterHeight", NULL, "f"); - addFunction(10.f, 0.f, dummy_func, "osSetRegionSunSettings", NULL, "iif"); - addFunction(10.f, 0.f, dummy_func, "osSetEstateSunSettings", NULL, "if"); - addFunction(10.f, 0.f, dummy_func, "osGetCurrentSunHour", "f", NULL); - addFunction(10.f, 0.f, dummy_func, "osSunGetParam","f", "s"); // Deprecated. Use osGetSunParam instead - addFunction(10.f, 0.f, dummy_func, "osSunSetParam", "sf", NULL); // Deprecated. Use osSetSunParam instead - addFunction(10.f, 0.f, dummy_func, "osWindActiveModelPluginName", "s", NULL); - addFunction(10.f, 0.f, dummy_func, "osParcelJoin", NULL, "vv"); - addFunction(10.f, 0.f, dummy_func, "osParcelSubdivide", NULL, "vv"); - addFunction(10.f, 0.f, dummy_func, "osParcelSetDetails", NULL, "vv"); // Deprecated. Use osSetParcelDetails instead. - // addFunction(10.f, 0.f, dummy_func, "osWindParamSet", NULL, "ssf"); // This function was renamed before it was implemented. Leaving this in for now. - // addFunction(10.f, 0.f, dummy_func, "osWindParamGet", "f", "ss"); // This function was renamed before it was implemented. Leaving this in for now. - addFunction(10.f, 0.f, dummy_func, "osList2Double", "f", "li"); + // + // OSSL Functions COMMON to OpenSim & Aurora-Sim addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURL", NULL, "ksssi"); - addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureData", NULL, "ksssi"); addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlend", NULL, "ksssii"); - addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlend", NULL, "ksssii"); addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlendFace", NULL, "ksssfiiii"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureData", NULL, "ksssi"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlend", NULL, "ksssii"); addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlendFace", NULL, "ksssfiiii"); - addFunction(10.f, 0.f, dummy_func, "osTerrainGetHeight", "f", "ii"); // Deprecated. Use osGetTerrainHeight instead - addFunction(10.f, 0.f, dummy_func, "osTerrainSetHeight", NULL, "iif"); // Deprecated. Use osSetTerrainHeight instead + addFunction(10.f, 0.f, dummy_func, "osGetTerrainHeight", "f", "ii"); + addFunction(10.f, 0.f, dummy_func, "osSetTerrainHeight", NULL, "iif"); addFunction(10.f, 0.f, dummy_func, "osTerrainFlush", NULL, NULL); addFunction(10.f, 0.f, dummy_func, "osRegionRestart", "i", "f"); addFunction(10.f, 0.f, dummy_func, "osRegionNotice",NULL, "s"); addFunction(10.f, 0.f, dummy_func, "osConsoleCommand", NULL, "s"); addFunction(10.f, 0.f, dummy_func, "osSetParcelMediaURL", NULL, "s"); - addFunction(10.f, 0.f, dummy_func, "osSetParcelSIPAddress", NULL, "s"); addFunction(10.f, 0.f, dummy_func, "osSetPrimFloatOnWater", NULL, "i"); - addFunction(10.f, 0.f, dummy_func, "osTeleportAgent", NULL, "ksvv"); + addFunction(10.f, 0.f, dummy_func, "osSetParcelSIPAddress", NULL, "s"); addFunction(10.f, 0.f, dummy_func, "osGetAgentIP", "s", "k"); addFunction(10.f, 0.f, dummy_func, "osGetAgents", "l", NULL); + addFunction(10.f, 0.f, dummy_func, "osTeleportAgent", NULL, "ksvv"); // Polymorphic + addFunction(10.f, 0.f, dummy_func, "osTeleportOwner", NULL, "svv"); // Polymorphic addFunction(10.f, 0.f, dummy_func, "osAvatarPlayAnimation", NULL, "ks"); addFunction(10.f, 0.f, dummy_func, "osAvatarStopAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osForceAttachToAvatar", NULL, "i"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osForceDetachFromAvatar", NULL, NULL); // May.03.2012 addFunction(10.f, 0.f, dummy_func, "osMovePen", NULL, "sii"); - addFunction(10.f, 0.f, dummy_func, "osDrawLine", NULL, "siiii"); + addFunction(10.f, 0.f, dummy_func, "osDrawLine", NULL, "siiii"); // Polymorphic addFunction(10.f, 0.f, dummy_func, "osDrawText", NULL, "ss"); addFunction(10.f, 0.f, dummy_func, "osDrawEllipse", NULL, "sii"); addFunction(10.f, 0.f, dummy_func, "osDrawRectangle", NULL, "sii"); @@ -574,14 +581,27 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "osSetFontSize", NULL, "si"); addFunction(10.f, 0.f, dummy_func, "osSetFontName", NULL, "ss"); addFunction(10.f, 0.f, dummy_func, "osSetPenSize", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "osSetPenColor", NULL, "ss"); addFunction(10.f, 0.f, dummy_func, "osSetPenCap", NULL, "sss"); - addFunction(10.f, 0.f, dummy_func, "osSetPenColour", NULL, "ss"); // Deprecated. Use osSetPenColor instead addFunction(10.f, 0.f, dummy_func, "osDrawImage", NULL, "siis"); addFunction(10.f, 0.f, dummy_func, "osGetDrawStringSize", "v", "sssi"); - addFunction(10.f, 0.f, dummy_func, "osSetStateEvents", NULL, "i"); + addFunction(10.f, 0.f, dummy_func, "osList2Double", "f", "li"); + addFunction(10.f, 0.f, dummy_func, "osSetRegionWaterHeight", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "osSetRegionSunSettings", NULL, "iif"); + addFunction(10.f, 0.f, dummy_func, "osSetEstateSunSettings", NULL, "if"); + addFunction(10.f, 0.f, dummy_func, "osGetCurrentSunHour", "f", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetSunParam","f", "s"); + addFunction(10.f, 0.f, dummy_func, "osSetSunParam", "sf", NULL); + addFunction(10.f, 0.f, dummy_func, "osWindActiveModelPluginName", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osSetWindParam", NULL, "ssf"); + addFunction(10.f, 0.f, dummy_func, "osGetWindParam", "f", "ss"); + addFunction(10.f, 0.f, dummy_func, "osParcelJoin", NULL, "vv"); + addFunction(10.f, 0.f, dummy_func, "osParcelSubdivide", NULL, "vv"); + addFunction(10.f, 0.f, dummy_func, "osSetParcelDetails", NULL, "vl"); addFunction(10.f, 0.f, dummy_func, "osGetScriptEngineName", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osGetSimulatorVersion", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osParseJSON", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "osParseJSONNew", "s", "s"); // mar.5.2012 addFunction(10.f, 0.f, dummy_func, "osMessageObject", NULL, "ks"); addFunction(10.f, 0.f, dummy_func, "osMakeNotecard", NULL, "sl"); addFunction(10.f, 0.f, dummy_func, "osGetNotecardLine", "s", "si"); @@ -592,16 +612,16 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "osGetGridNick", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osGetGridName", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osGetGridLoginURI", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI","s",NULL); // mar.5.2012 + addFunction(10.f, 0.f, dummy_func, "osGetGridGatekeeperURI", "s", "NULL"); //mar.11.2012 + addFunction(10.f, 0.f, dummy_func, "osGetGridCustom","s","k"); // mar.5.2012 addFunction(10.f, 0.f, dummy_func, "osFormatString", "s", "sl"); addFunction(10.f, 0.f, dummy_func, "osMatchString", "l", "ssi"); + addFunction(10.f, 0.f, dummy_func, "osReplaceString", "s", "sssi"); // mar.5.2012 addFunction(10.f, 0.f, dummy_func, "osLoadedCreationDate", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osLoadedCreationTime", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osLoadedCreationID", "s", NULL); addFunction(10.f, 0.f, dummy_func, "osGetLinkPrimitiveParams", "l", "il"); - addFunction(10.f, 0.f, dummy_func, "osNpcCreate", "k", "ssvk"); - addFunction(10.f, 0.f, dummy_func, "osNpcMoveTo", NULL, "kv"); - addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "ks"); - addFunction(10.f, 0.f, dummy_func, "osNpcRemove", NULL, "k"); addFunction(10.f, 0.f, dummy_func, "osGetMapTexture", "k", NULL); addFunction(10.f, 0.f, dummy_func, "osGetRegionMapTexture", "k", "s"); addFunction(10.f, 0.f, dummy_func, "osGetRegionStats", "l", NULL); @@ -613,52 +633,105 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "osGetPrimitiveParams", "l", "kl"); addFunction(10.f, 0.f, dummy_func, "osSetPrimitiveParams", NULL, "kl"); addFunction(10.f, 0.f, dummy_func, "osSetProjectionParams", NULL, "kikfff"); - addFunction(10.f, 0.f, dummy_func, "osUnixTimeToTimestamp", "s", "i"); - addFunction(10.f, 0.f, dummy_func, "osSetPenColor", NULL, "ss"); - addFunction(10.f, 0.f, dummy_func, "osGetSunParam","f", "s"); - addFunction(10.f, 0.f, dummy_func, "osSetSunParam", NULL, "sf"); - addFunction(10.f, 0.f, dummy_func, "osSetParcelDetails", NULL, "vl"); - addFunction(10.f, 0.f, dummy_func, "osGetTerrainHeight", "f", "ii"); - addFunction(10.f, 0.f, dummy_func, "osSetTerrainHeight", NULL, "iif"); addFunction(10.f, 0.f, dummy_func, "osGetAvatarList", "l", NULL); - addFunction(10.f, 0.f, dummy_func, "osTeleportOwner", NULL, "svv"); - addFunction(10.f, 0.f, dummy_func, "osGetWindParam","f", "ss"); - addFunction(10.f, 0.f, dummy_func, "osSetWindParam", NULL, "ssf"); - + addFunction(10.f, 0.f, dummy_func, "osUnixTimeToTimestamp", "s", "i"); + addFunction(10.f, 0.f, dummy_func, "osGetInventoryDesc", "s", "s"); //mar.17.2012 + addFunction(10.f, 0.f, dummy_func, "osInviteToGroup", "i", "k"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osEjectFromGroup", "i", "k"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osSetTerrainTexture", NULL, "ik"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osSetTerrainTextureHeight", NULL, "iff"); // May.03.2012 - // LightShare functions +// +// OSSL Functions OpenSim Unique + addFunction(10.f, 0.f, dummy_func, "osSetStateEvents", NULL, "i"); + addFunction(10.f, 0.f, dummy_func, "osIsNpc","i","k"); // mar.5.2012 + addFunction(10.f, 0.f, dummy_func, "osNpcCreate", "k", "ssvk"); + addFunction(10.f, 0.f, dummy_func, "osNpcSaveAppearance", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcLoadAppearance", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetPos","k","k"); + addFunction(10.f, 0.f, dummy_func, "osNpcMoveTo", NULL, "kv"); + addFunction(10.f, 0.f, dummy_func, "osNpcMoveToTarget", NULL, "kvi"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner","k","k"); // mar.5.2012 + addFunction(10.f, 0.f, dummy_func, "osNpcGetRot", "r", "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcSetRot", NULL, "kr"); + addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "kis"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki"); + addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcRemove", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation",NULL,"ks"); // mar.5.2012 + addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation",NULL,"ks"); // mar.5.2012 + addFunction(10.f, 0.f, dummy_func, "osOwnerSaveAppearance", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osAgentSaveAppearance", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcShout", NULL, "kis"); // May.03.2012 + addFunction(10.f, 0.f, dummy_func, "osNpcWhisper", NULL, "kis"); // May.03.2012 +// +// OSSL Functions Aurora-Sim Unique + addFunction(10.f, 0.f, dummy_func, "osReturnObject", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osReturnObjects", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "osShutDown", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osAddAgentToGroup", NULL, "kss"); + addFunction(10.f, 0.f, dummy_func, "osRezObject", NULL, "svvriiiii"); +// +// LightShare functions (Careminster Variant) addFunction(10.f, 0.f, dummy_func, "cmSetWindlightScene", "i", "l"); addFunction(10.f, 0.f, dummy_func, "cmSetWindlightSceneTargeted", "i", "lk"); addFunction(10.f, 0.f, dummy_func, "cmGetWindlightScene", "l", "l"); - // LightShare functions - alternate versions - // don't ask me why they renamed 'em, but we need to include both versions -- MC +// LightShare functions - alternate versions (os & aa variant) addFunction(10.f, 0.f, dummy_func, "lsSetWindlightScene", "i", "l"); addFunction(10.f, 0.f, dummy_func, "lsSetWindlightSceneTargeted", "i", "lk"); addFunction(10.f, 0.f, dummy_func, "lsGetWindlightScene", "l", "l"); - - // New OSSL functions 08-10-2011 - addFunction(10.f, 0.f, dummy_func, "osNpcSaveAppearance", "k", "ks"); - addFunction(10.f, 0.f, dummy_func, "osNpcLoadAppearance", NULL, "ks"); - addFunction(10.f, 0.f, dummy_func, "osNpcMoveToTarget", NULL, "kvi"); - addFunction(10.f, 0.f, dummy_func, "osOwnerSaveAppearance", "k", "s"); - - // More new stuffs - addFunction(10.f, 0.f, dummy_func, "osNpcGetRot", "r", "k"); - addFunction(10.f, 0.f, dummy_func, "osNpcSetRot", NULL, "kr"); - addFunction(10.f, 0.f, dummy_func, "osAgentSaveAppearance", "k", "ks"); - addFunction(10.f, 0.f, dummy_func, "osNpcGetPos", "v", "k"); - addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k"); - - addFunction(10.f, 0.f, dummy_func, "osIsNpc", "i", "k"); - addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner", "k", "k"); - addFunction(10.f, 0.f, dummy_func, "osGetGridCustom", "s", "s"); - addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI", "s", NULL); - addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation", NULL, "ks"); - addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki"); - addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "k"); - addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation", NULL, "ks"); - addFunction(10.f, 0.f, dummy_func, "osSetRot", NULL, "kq"); - +// +// aaFunctions Aurora-Sim ONLY + addFunction(10.f, 0.f, dummy_func, "aaSetCloudDensity", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "aaUpdateDatabase", NULL, "sss"); + addFunction(10.f, 0.f, dummy_func, "aaQueryDatabase", "l", "ss"); + addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLValues", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLKeys","l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetConeOfSilence", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "aaSerializeXML", "s", "ll"); + addFunction(10.f, 0.f, dummy_func, "aaGetTeam", "s", "k"); + addFunction(10.f, 0.f, dummy_func, "aaGetHealth", "f", "k"); + addFunction(10.f, 0.f, dummy_func, "aaJoinCombat", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "aaLeaveCombat", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "aaJoinCombatTeam", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "aaRequestCombatPermission", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaThawAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaFreezeAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaGetTeamMembers", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaGetLastOwner", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "aaSayDistance", NULL, "ifs"); + addFunction(10.f, 0.f, dummy_func, "aaSayTo", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "aaGetWalkDisabled ", "i", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetWalkDisabled", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "aaGetFlyDisabled ", "i", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetFlyDisabled", NULL, "sf"); + addFunction(10.f, 0.f, dummy_func, "aaAvatarFullName2Key ", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "aaRaiseError", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaGetText ", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "aaGetTextColor ", "r", NULL); + addFunction(10.f, 0.f, dummy_func, "aaSetEnv ", NULL, "sl"); + addFunction(10.f, 0.f, dummy_func, "aaGetIsInfiniteRegion", "i", NULL); +// botFunctions Aurora-Sim ONLY + addFunction(10.f, 0.f, dummy_func, "botGetWaitingTime", "v", "i"); + addFunction(10.f, 0.f, dummy_func, "botSetMap", NULL, "slii"); + addFunction(10.f, 0.f, dummy_func, "botCreateBot", "s", "sssv"); + addFunction(10.f, 0.f, dummy_func, "botRemoveBot", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botPauseMovement", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botResumeMovement", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botFollowAvatar", NULL, "ssff"); + addFunction(10.f, 0.f, dummy_func, "botStopFollowAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botSendChatMessage", NULL, "ssii"); + addFunction(10.f, 0.f, dummy_func, "botSendIM",NULL,"sss"); + addFunction(10.f, 0.f, dummy_func, "botSetShouldFly", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "botSitObject", NULL, "ssv"); + addFunction(10.f, 0.f, dummy_func, "botStandUp", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botTouchObject", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "botAddTag", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "botGetBotsWithTag", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "botRemoveBotsWithTag", NULL, "s"); + // energy, sleep, dummy_func, name, return type, parameters } LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, BOOL god_only) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 58ccbfa1d..d8514030f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -872,7 +872,6 @@ set(viewer_HEADER_FILES llpanellandmedia.h llpanellandobjects.h llpanellandoptions.h - llpanelLCD.h llpanellogin.h llpanelmaininventory.h llpanelmorph.h diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index b264e08e3..dd50567cd 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -14,7 +14,7 @@ key Key type. Use NULL_KEY to test for empty keys vector Vector type of 3 floats. Used to represent 3D motion, Euler angles, and color.:Access components by .x, .y. or .z rotation Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y., .z, or .w list List of various data types -quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w +quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w # events [word 0, .3, .5] @@ -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 task receives asynchronous data. 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 @@ -70,9 +70,10 @@ STATUS_BLOCK_GRAB_OBJECT This status flag keeps the object from being moved by g STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects + AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME -AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username -AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name +AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name +AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username ACTIVE Passed in llSensor library function to look for moving objects PASSIVE Passed in llSensor library function to look for objects that aren't moving SCRIPTED Passed in llSensor library function to look for scripted objects @@ -171,10 +172,10 @@ OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key -OBJECT_RUNNING_SCRIPT_COUNT Used with llGetObjectDetails to get an object's velocity. -OBJECT_TOTAL_SCRIPT_COUNT Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned. -OBJECT_SCRIPT_MEMORY Used with llGetObjectDetails to get an object's group's key. -OBJECT_SCRIPT_TIME Used with llGetObjectDetails to get an object's creator's key. +OBJECT_RUNNING_SCRIPT_COUNT Gets the number of running scripts attached to the object or agent +OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped, attached to the object or agent. +OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes. +OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds. OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object. OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost. OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost. @@ -185,8 +186,8 @@ VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support VEHICLE_TYPE_SLED Used with llSetVehicleType to make a simple vehicle that bumps along the ground, and likes to move along its local x-axis VEHICLE_TYPE_CAR Used with llSetVehicleType to make a vehicle that bounces along the ground but needs the motors to be driven from external controls or timer events VEHICLE_TYPE_BOAT Used with llSetVehicleType to make a vehicle that hovers over water with lots of friction and some angular deflection -VEHICLE_TYPE_AIRPLANE Used with llSetVehicleType to make a vehicle that uses linear deflection for lift, and banking to turn, but doesn't hover -VEHICLE_TYPE_BALLOON Used with llSetVehicleType to make a vehicle that uses hover, and friction, but doesn't use deflection +VEHICLE_TYPE_AIRPLANE Used with llSetVehicleType to make a vehicle that uses linear deflection for lift, and banking to turn, but doesn't hover +VEHICLE_TYPE_BALLOON Used with llSetVehicleType to make a vehicle that uses hover, and friction, but doesn't use deflection VEHICLE_REFERENCE_FRAME Rotation of vehicle axes relative to local frame @@ -289,14 +290,14 @@ ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral +ATTACH_HUD_BOTTOM Passed to llAttachToAvatar to attach task to bottom hud area +ATTACH_HUD_BOTTOM_LEFT Passed to llAttachToAvatar to attach task to bottom left hud area +ATTACH_HUD_BOTTOM_RIGHT Passed to llAttachToAvatar to attach task to bottom right hud area +ATTACH_HUD_CENTER_1 Passed to llAttachToAvatar to attach task to center 1 hud area ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud area -ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area -ATTACH_HUD_CENTER_1 Passed to llAttachToAvatar to attach task to center 1 hud area -ATTACH_HUD_BOTTOM_LEFT Passed to llAttachToAvatar to attach task to bottom left hud area -ATTACH_HUD_BOTTOM Passed to llAttachToAvatar to attach task to bottom hud area -ATTACH_HUD_BOTTOM_RIGHT Passed to llAttachToAvatar to attach task to bottom right hud area +ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area ##The following attachment points exist only as numbers thus far, but will be ready when the time comes. #ATTACH_NECK Passed to llAttachToAvatar to attach task to neck #ATTACH_ROOT Passed to llAttachToAvatar to attach task to avatar center/root @@ -369,29 +370,28 @@ REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is receiv PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string. PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string. PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments -PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form -PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX. PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER PRIM_PHYSICS Sets physics to TRUE or FALSE PRIM_FLEXIBLE Followed by TRUE or FALSE, integer softness, float gravity, float friction, float wind, float tension, and vector force PRIM_POINT_LIGHT Followed by TRUE or FALSE, vector color, float intensity, float radius, float falloff -PRIM_TEMP_ON_REZ Sets temporay on rez to TRUE or FALSE +PRIM_TEMP_ON_REZ Sets temporary on rez to TRUE or FALSE PRIM_PHANTOM Sets phantom to TRUE or FALSE PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams PRIM_POSITION Sets primitive position to a vector position -PRIM_POS_LOCAL Sets the prim's local position PRIM_SIZE Sets primitive size to a vector size PRIM_ROTATION Sets primitive rotation -PRIM_ROT_LOCAL Sets the prim's local rotation +PRIM_TEXT Used to get or set the object's floating text. PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians -PRIM_TEXT For primitive hovertext. Followed by a string, a vector color and a float alpha PRIM_COLOR Followed by an integer face, vector color, and float alpha PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount -PRIM_OMEGA Makes the object spin at the specified axis and rate +PRIM_POS_LOCAL Sets the prim's local position +PRIM_ROT_LOCAL Sets the prim's local rotation +PRIM_OMEGA Makes the object spin at the specified axis and rate PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call +PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form PROFILE_NONE Disables profiling PROFILE_SCRIPT_MEMORY Enables memory profiling @@ -454,9 +454,10 @@ PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis +PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX. PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects) -PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim. PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects) +PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim. MASK_BASE Base permissions MASK_OWNER Owner permissions @@ -526,19 +527,13 @@ REGION_FLAG_BLOCK_FLY Used with llGetRegionFlags to find if a region blocks f REGION_FLAG_ALLOW_DIRECT_TELEPORT Used with llGetRegionFlags to find if a region allows direct teleports REGION_FLAG_RESTRICT_PUSHOBJECT Used with llGetRegionFlags to find if a region restricts llPushObject() calls -ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list. -ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list. -ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list. -ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list. -ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list. -ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list. - HTTP_METHOD Used with llHTTPRequest to specify the method, "GET", "POST", "PUT", or "DELETE" HTTP_MIMETYPE Used with llHTTPRequest to specify the MIME type, defaults to "text/plain" HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum response body to return HTTP_VERIFY_CERT Used with llHTTPRequest to specify SSL certificate verification HTTP_BODY_TRUNCATED Used with http_response to indicate truncation point in bytes HTTP_VERBOSE_THROTTLE Used with llHTTPRequest to shout error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit. +HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum body size for the date returned from the request. Mono scripts can request from 1byte to 16k, non-mono scripts can request from 1byte to 4k. The default is 2k. PARCEL_COUNT_TOTAL Used with llGetParcelPrimCount to get the total number of prims on the parcel PARCEL_COUNT_OWNER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the owner @@ -613,7 +608,132 @@ STATUS_NOT_SUPPORTED Feature not supported STATUS_INTERNAL_ERROR An internal error occurred STATUS_WHITELIST_FAILED URL failed to pass whitelist -# windlight constants +RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM. +RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise. +RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results. +RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results. +RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results. +RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256). +RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND. +RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay(). +RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay(). +RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay(). +RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay(). + +RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting. +RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low. +RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason. + +ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list. +ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list. +ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list. +ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list. +ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list. +ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list. + +DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density. +FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction. +RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution. +GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier. + +KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list. +KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. +KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. +KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. +KFM_CMD_SET_MODE TODO: add documentation +KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. +KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. +KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. +KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode. +KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode. +KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list. +KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION. +KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION. + +CHARACTER_CMD_STOP TODO: add documentation +CHARACTER_CMD_JUMP TODO: add documentation + +CHARACTER_DESIRED_SPEED TODO: add documentation +CHARACTER_RADIUS TODO: add documentation +CHARACTER_LENGTH TODO: add documentation +CHARACTER_ORIENTATION TODO: add documentation +CHARACTER_AVOIDANCE_MODE TODO: add documentation +PURSUIT_OFFSET TODO: add documentation +REQUIRE_LINE_OF_SIGHT TODO: add documentation +PURSUIT_FUZZ_FACTOR TODO: add documentation +PURSUIT_INTERCEPT TODO: add documentation +FORCE_DIRECT_PATH TODO: add documentation +VERTICAL TODO: add documentation +HORIZONTAL TODO: add documentation +AVOID_CHARACTERS TODO: add documentation +AVOID_DYNAMIC_OBSTACLES TODO: add documentation + +PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer. +PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running +PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached. +PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it. +PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable. +PU_FAILURE_OTHER Unknown failure +PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region. +PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path. +PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering). +PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal. + +CHARACTER_TYPE TODO: add documentation +CHARACTER_TYPE_A TODO: add documentation +CHARACTER_TYPE_B TODO: add documentation +CHARACTER_TYPE_C TODO: add documentation +CHARACTER_TYPE_D TODO: add documentation +CHARACTER_TYPE_NONE TODO: add documentation + +TRAVERSAL_TYPE TODO: add documentation +TRAVERSAL_TYPE_SLOW TODO: add documentation +TRAVERSAL_TYPE_FAST TODO: add documentation +TRAVERSAL_TYPE_NONE TODO: add documentation + +CHARACTER_MAX_ACCEL TODO: add documentation +CHARACTER_MAX_DECEL TODO: add documentation +CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation +CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation +CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation +CHARACTER_DESIRED_TURN_SPEED TODO: add documentation +CHARACTER_MAX_TURN_RADIUS TODO: add documentation +# --- OpenSim and Aurora-Sim constants Below --- +# OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs) +# Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs) +CHANGED_ANIMATION OpenSim change event animation change detection. +# osGetRegionStats +STATS_TIME_DILATION returned value from osGetRegionStats(), 1st of 21 items in returned list. +STATS_SIM_FPS returned value from osGetRegionStats(), 2nd of 21 items in returned list. +STATS_PHYSICS_FPS returned value from osGetRegionStats(), 3rd of 21 items in returned list. +STATS_AGENT_UPDATES returned value from osGetRegionStats(), 4th of 21 items in returned list. +STATS_ROOT_AGENTS returned value from osGetRegionStats(), 5th of 21 items in returned list. +STATS_CHILD_AGENTS returned value from osGetRegionStats(), 6th of 21 items in returned list. +STATS_TOTAL_PRIMS returned value from osGetRegionStats(), 7th of 21 items in returned list. +STATS_ACTIVE_PRIMS returned value from osGetRegionStats(), 8th of 21 items in returned list. +STATS_FRAME_MS returned value from osGetRegionStats(), 9th of 21 items in returned list. +STATS_NET_MS returned value from osGetRegionStats(), 10th of 21 items in returned list. +STATS_PHYSICS_MS returned value from osGetRegionStats(), 11th of 21 items in returned list. +STATS_IMAGE_MS returned value from osGetRegionStats(), 12th of 21 items in returned list. +STATS_OTHER_MS returned value from osGetRegionStats(), 13th of 21 items in returned list. +STATS_IN_PACKETS_PER_SECOND returned value from osGetRegionStats(), 14th of 21 items in returned list. +STATS_OUT_PACKETS_PER_SECOND returned value from osGetRegionStats(), 15th of 21 items in returned list. +STATS_UNACKED_BYTES returned value from osGetRegionStats(), 16th of 21 items in returned list. +STATS_AGENT_MS returned value from osGetRegionStats(), 17th of 21 items in returned list. +STATS_PENDING_DOWNLOADS returned value from osGetRegionStats(), 18th of 21 items in returned list. +STATS_PENDING_UPLOADS returned value from osGetRegionStats(), 19th of 21 items in returned list. +STATS_ACTIVE_SCRIPTS returned value from osGetRegionStats(), 20th of 21 items in returned list. +STATS_SCRIPT_LPS returned value from osGetRegionStats(), 21st of 21 items in returned list. +# OpenSim NPC +OS_NPC_FLY used by osNPC. +OS_NPC_NO_FLY used by osNPC. +OS_NPC_LAND_AT_TARGET used by osNPC. +OS_NPC_SIT_NOW used by osNPC. +OS_NPC_CREATOR_OWNED used by osNPC. +OS_NPC_NOT_OWNED used by osNPC. +OS_NPC_SENSE_AS_AGENT used by osNPC. +OS_NPC_RUNNING used by osNPC. +# Windlight/Lightshare WL_WATER_COLOR Windlight Water Colour WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier @@ -651,112 +771,28 @@ WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds - -# keyframe constants -KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list. -KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. -KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list. -KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. -KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. -KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode. -KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode. -KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION. -KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION. -KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. -KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. -KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. - -# OSSL constants -STATS_TIME_DILATION -STATS_SIM_FPS -STATS_PHYSICS_FPS -STATS_AGENT_UPDATES -STATS_ROOT_AGENTS -STATS_CHILD_AGENTS -STATS_TOTAL_PRIMS -STATS_ACTIVE_PRIMS -STATS_FRAME_MS -STATS_NET_MS -STATS_PHYSICS_MS -STATS_IMAGE_MS -STATS_OTHER_MS -STATS_IN_PACKETS_PER_SECOND -STATS_OUT_PACKETS_PER_SECOND -STATS_UNACKED_BYTES -STATS_AGENT_MS -STATS_PENDING_DOWNLOADS -STATS_PENDING_UPLOADS -STATS_ACTIVE_SCRIPTS -STATS_SCRIPT_LPS - -## Constants for osNpc* functions -NPC -OS_NPC_CREATOR_OWNED -OS_NPC_NOT_OWNED -OS_NPC_SENSE_AS_AGENT -OS_NPC_FLY -OS_NPC_NO_FLY -OS_NPC_LAND_AT_TARGET -OS_NPC_SIT_NOW - -## Missing LSL constants (from http://wiki.secondlife.com/wiki/Category:LSL_Constants) - -# physics constants -DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density. -FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction. -RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution. -GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier. - -##Even more missing constants, thanks to Justin Clark Casey for pointing me into the right direction -##Liru: Were these supposed to be LSL? They're undocumented, commenting out for now. -#CAMERA_FOCUS_OFFSET_X -#CAMERA_FOCUS_OFFSET_Y -#CAMERA_FOCUS_OFFSET_Z -#CAMERA_FOCUS_X -#CAMERA_FOCUS_Y -#CAMERA_FOCUS_Z -#CAMERA_POSITION_X -#CAMERA_POSITION_Y -#CAMERA_POSITION_Z -#CHANGED_ANIMATION -#CHANGED_REGION_RESTART -#DATA_SIM_RELEASE -#LIST_STAT_HARMONIC_MEAN -#PARCEL_DETAILS_CLAIMDATE -#VEHICLE_FLAG_LOCK_HOVER_HEIGHT -#VEHICLE_FLAG_LOCK_ROTATION -#VEHICLE_FLAG_NO_X -#VEHICLE_FLAG_NO_Y -#VEHICLE_FLAG_NO_Z -#VEHICLE_RANGE_BLOCK -#VEHICLE_ROLL_FRAME -#LSL_STATUS_BOUNDS_ERROR -#LSL_STATUS_INTERNAL_ERROR -#LSL_STATUS_MALFORMED_PARAMS -#LSL_STATUS_NOT_FOUND -#LSL_STATUS_NOT_SUPPORTED -#LSL_STATUS_OK -#LSL_STATUS_TYPE_MISMATCH -#LSL_STATUS_WHITELIST_FAILED - -# castray constants -RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason. -RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low. -RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting. - -RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND. -RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise. -RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM. -RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256). - -RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay(). -RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay(). -RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay(). -RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay(). - -RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results. -RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results. -RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results. +# Aurora-Sim Constants (\Aurora\AuroraDotNetEngine\APIs\AA_Constants.cs) --> +ENABLE_GRAVITY enable_gravity. +GRAVITY_FORCE_X gravity_force_x. +GRAVITY_FORCE_Y gravity_force_y. +GRAVITY_FORCE_Z gravity_force_z. +ADD_GRAVITY_POINT add_gravity_point. +ADD_GRAVITY_FORCE add_gravity_force. +START_TIME_REVERSAL_SAVING start_time_reversal_saving. +STOP_TIME_REVERSAL_SAVING stop_time_reversal_saving. +START_TIME_REVERSAL start_time_reversal. +STOP_TIME_REVERSAL stop_time_reversal. +# Aurora botFunctions +BOT_FOLLOW_FLAG_NONE value 0. +BOT_FOLLOW_FLAG_INDEFINITELY value 1. +BOT_TAG_FIND_ALL value AllBots. +BOT_FOLLOW_WALK value 0. +BOT_FOLLOW_RUN value 1. +BOT_FOLLOW_FLY value 2. +BOT_FOLLOW_TELEPORT value 3. +BOT_FOLLOW_WAIT value 4. +BOT_FOLLOW_TRIGGER_HERE_EVENT value 1. +BOT_FOLLOW_FLAG_FORCEDIRECTPATH value 4. # string constants [word .1, .3, .5] diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1cb44e8fa..deee94daa 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7154,6 +7154,17 @@ Value help/index.html + WebProfileURL + + Comment + URL for Web Profiles + Persist + 0 + Type + String + Value + https://my.secondlife.com/[AGENT_NAME] + HighResSnapshot Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5103126b3..0d5f752ca 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -217,11 +217,6 @@ ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor // -#if LL_WINDOWS && LL_LCD_COMPILE - #include "lllcd.h" -#endif - - //---------------------------------------------------------------------------- // viewer.cpp - these are only used in viewer, should be easily moved. @@ -814,13 +809,6 @@ bool LLAppViewer::init() // call all self-registered classes LLInitClassList::instance().fireCallbacks(); -#if LL_LCD_COMPILE - // start up an LCD window on a logitech keyboard, if there is one - HINSTANCE hInstance = GetModuleHandle(NULL); - gLcdScreen = new LLLCD(hInstance); - CreateLCDDebugWindows(); -#endif - LLFolderViewItem::initClass(); // SJB: Needs to happen after initWindow(), not sure why but related to fonts gGLManager.getGLInfo(gDebugInfo); @@ -1202,11 +1190,6 @@ bool LLAppViewer::mainLoop() pingMainloopTimeout("Main:Snapshot"); LLFloaterSnapshot::update(); // take snapshots gGLActive = FALSE; -#if LL_LCD_COMPILE - // update LCD Screen - pingMainloopTimeout("Main:LCD"); - gLcdScreen->UpdateDisplay(); -#endif } } @@ -1574,12 +1557,6 @@ bool LLAppViewer::cleanup() // gDXHardware.cleanup(); //#endif // LL_WINDOWS -#if LL_LCD_COMPILE - // shut down the LCD window on a logitech keyboard, if there is one - delete gLcdScreen; - gLcdScreen = NULL; -#endif - LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager(); if (!volume_manager->cleanup()) { @@ -1682,6 +1659,7 @@ bool LLAppViewer::cleanup() writeDebugInfo(); + LLViewerMedia::saveCookieFile(); // Stop the plugin read thread if it's running. LLPluginProcessParent::setUseReadThread(false); diff --git a/indra/newview/llfloateravatarinfo.cpp b/indra/newview/llfloateravatarinfo.cpp index d3fc5596d..f60e24623 100644 --- a/indra/newview/llfloateravatarinfo.cpp +++ b/indra/newview/llfloateravatarinfo.cpp @@ -42,6 +42,7 @@ #include "llcommandhandler.h" #include "llpanelavatar.h" #include "lluictrlfactory.h" +#include "llweb.h" // linden library includes #include "llinventory.h" @@ -293,3 +294,13 @@ LLPreview::EAssetStatus LLFloaterAvatarInfo::getAssetStatus() } return mAssetStatus; } + +std::string getProfileURL(const std::string& agent_name) +{ + std::string url = gSavedSettings.getString("WebProfileURL"); + LLSD subs; + subs["AGENT_NAME"] = agent_name; + url = LLWeb::expandURLSubstitutions(url,subs); + LLStringUtil::toLower(url); + return url; +} diff --git a/indra/newview/llfloateravatarinfo.h b/indra/newview/llfloateravatarinfo.h index 9d78e18ec..6e608e9e4 100644 --- a/indra/newview/llfloateravatarinfo.h +++ b/indra/newview/llfloateravatarinfo.h @@ -101,5 +101,6 @@ private: EOnlineStatus mSuggestedOnlineStatus; }; +std::string getProfileURL(const std::string& agent_name); #endif diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index ed55ecbae..1a097aabb 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -455,20 +455,6 @@ void LLFloaterChat::addChat(const LLChat& chat, } // [/RLVa:KB] -#if LL_LCD_COMPILE - // add into LCD displays - if (!invisible_script_debug_chat) - { - if (!from_instant_message) - { - AddNewChatToLCD(chat.mText); - } - else - { - AddNewIMToLCD(chat.mText); - } - } -#endif if (!invisible_script_debug_chat && !chat.mMuted && gConsole diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d5e9702d7..f973a7619 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -58,7 +58,6 @@ #include "llpanelgeneral.h" #include "llpanelinput.h" #include "llpanellogin.h" -#include "llpanelLCD.h" #include "llpanelmsgs.h" #include "llpanelweb.h" #include "llpanelskins.h" @@ -179,20 +178,6 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel()); mPrefsIM->getPanel()->setDefaultBtn(default_btn); -#if LL_LCD_COMPILE - - // only add this option if we actually have a logitech keyboard / speaker set - if (gLcdScreen->Enabled()) - { - mLCDPanel = new LLPanelLCD(); - mTabContainer->addTabPanel(mLCDPanel, mLCDPanel->getLabel()); - mLCDPanel->setDefaultBtn(default_btn); - } - -#else - mLCDPanel = NULL; -#endif - mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel()); mMsgPanel->setDefaultBtn(default_btn); @@ -322,14 +307,6 @@ void LLPreferenceCore::apply() LLFloaterHardwareSettings::instance()->apply(); mWebPanel->apply(); -#if LL_LCD_COMPILE - // only add this option if we actually have a logitech keyboard / speaker set - if (gLcdScreen->Enabled()) - { - mLCDPanel->apply(); - } -#endif -// mWebPanel->apply(); } @@ -354,14 +331,6 @@ void LLPreferenceCore::cancel() LLFloaterHardwareSettings::instance()->cancel(); mWebPanel->cancel(); -#if LL_LCD_COMPILE - // only add this option if we actually have a logitech keyboard / speaker set - if (gLcdScreen->Enabled()) - { - mLCDPanel->cancel(); - } -#endif -// mWebPanel->cancel(); } // static diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index ebb0cb1aa..8563b98a4 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -118,20 +118,20 @@ public: virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse); virtual BOOL addFolder( LLFolderViewFolder* folder); - // Finds width and height of this object and it's children. Also - // makes sure that this view and it's children are the right size. + // Find width and height of this object and its children. Also + // makes sure that this view and its children are the right size. virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); void arrangeAll() { mArrangeGeneration++; } S32 getArrangeGeneration() { return mArrangeGeneration; } - // applies filters to control visibility of inventory items + // Apply filters to control visibility of inventory items virtual void filter( LLInventoryFilter& filter); - // get the last selected item + // Get the last selected item virtual LLFolderViewItem* getCurSelectedItem( void ); - // Record the selected item and pass it down the hierachy. + // Record the selected item and pass it down the hierarchy. virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); @@ -141,13 +141,13 @@ public: // Called once a frame to update the selection if mSelectThisID has been set void updateSelection(); - // This method is used to toggle the selection of an item. Walks - // children, and keeps track of selected objects. + // This method is used to toggle the selection of an item. + // Walks children and keeps track of selected objects. virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); virtual std::set getSelectionList() const; - // make sure if ancestor is selected, descendents are not + // Make sure if ancestor is selected, descendents are not void sanitizeSelection(); void clearSelection(); void addToSelectionList(LLFolderViewItem* item); @@ -158,21 +158,21 @@ public: void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; } LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; } - // deletion functionality + // Deletion functionality void removeSelectedItems(); - // open the selected item. + // Open the selected item void openSelectedItems( void ); void propertiesSelectedItems( void ); - // change the folder type + // Change the folder type void changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type); void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); BOOL autoOpenTest(LLFolderViewFolder* item); - // copy & paste + // Copy & paste virtual void copy(); virtual BOOL canCopy() const; @@ -185,7 +185,7 @@ public: virtual void doDelete(); virtual BOOL canDoDelete() const; - // public rename functionality - can only start the process + // Public rename functionality - can only start the process void startRenamingSelectedItem( void ); // These functions were used when there was only one folderview, diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 43fa98fbd..a203559c1 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -170,7 +170,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseMove(x, y); + mMediaSource->mouseMove(x, y, mask); gViewerWindow->setCursor(mLastSetCursor); } @@ -198,7 +198,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseUp(x, y); + mMediaSource->mouseUp(x, y, mask); /*// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, // in addition to the onFocusReceived() call below. Undo this. JC @@ -222,7 +222,7 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseDown(x, y); + mMediaSource->mouseDown(x, y, mask); gFocusMgr.setMouseCapture( this ); @@ -265,11 +265,11 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { if (LLUICtrl::handleRightMouseDown(x, y, mask)) return TRUE; - /*S32 media_x = x, media_y = y; + S32 media_x = x, media_y = y; convertInputCoords(media_x, media_y); if (mMediaSource) - mMediaSource->mouseDown(media_x, media_y); + mMediaSource->mouseDown(media_x, media_y, mask, 1); gFocusMgr.setMouseCapture( this ); @@ -277,7 +277,7 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { setFocus( TRUE ); } - */ + return TRUE; } @@ -289,7 +289,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseLeftDoubleClick( x, y); + mMediaSource->mouseDoubleClick( x, y, mask); gFocusMgr.setMouseCapture( this ); @@ -916,20 +916,16 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_BEGIN: { - LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL; - if(mMediaSource && mHideLoading) - { - mMediaSource->suspendUpdates(true); - } + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL; }; break; case MEDIA_EVENT_NAVIGATE_COMPLETE: { - LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; - if(mMediaSource && mHideLoading) + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; + if(mHidingInitialLoad) { - mMediaSource->suspendUpdates(false); + mHidingInitialLoad = false; } }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 602a1f153..ef25ae0e3 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -177,6 +177,7 @@ class LLMediaCtrl : bool mStretchToFill; bool mMaintainAspectRatio; bool mHideLoading; + bool mHidingInitialLoad; bool mDecoupleTextureSize; S32 mTextureWidth; S32 mTextureHeight; diff --git a/indra/newview/llpanelLCD.cpp b/indra/newview/llpanelLCD.cpp deleted file mode 100644 index ba7efba7b..000000000 --- a/indra/newview/llpanelLCD.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/** - * @file llpanellcd.cpp - * @brief lcd options panel - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llpanelLCD.h" - -// linden library includes -#include "llerror.h" -#include "llrect.h" -#include "llfontgl.h" -#include "message.h" -#include "lluictrlfactory.h" - -// project includes -#include "llviewerwindow.h" -#include "llcheckboxctrl.h" -#include "llradiogroup.h" -#include "llresmgr.h" -#include "lltextbox.h" -#include "llui.h" -#include "llviewercontrol.h" - -//Ventrella -#include "llagent.h" -//end Ventrella - -// for Logitech LCD keyboards / speakers -#ifndef LL_LCD_H -#include "lllcd.h" -#endif - - -// -// Globals -// - -// -// Static functions -// - - -LLPanelLCD::LLPanelLCD() -{ - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_lcd.xml"); -} - -BOOL LLPanelLCD::postBuild() -{ - requires("LCDDestination"); - requires("DisplayLinden"); - requires("DisplayDebug"); - requires("DisplayDebugConsole"); - requires("DisplayRegion"); - requires("DisplayChat"); - requires("DisplayIM"); - - if (!checkRequirements()) - { - return FALSE; - } - - refresh(); - - return TRUE; -} - - -LLPanelLCD::~LLPanelLCD() -{ - // Children all cleaned up by default view destructor. -} - -void LLPanelLCD::refresh() -{ - mLCDDestination = gSavedSettings.getS32("LCDDestination"); - mDisplayChat = gSavedSettings.getBOOL("DisplayChat"); - mDisplayIM = gSavedSettings.getBOOL("DisplayIM"); - mDisplayRegion = gSavedSettings.getBOOL("DisplayRegion"); - mDisplayDebug = gSavedSettings.getBOOL("DisplayDebug"); - mDisplayDebugConsole = gSavedSettings.getBOOL("DisplayDebugConsole"); - mDisplayLinden = gSavedSettings.getBOOL("DisplayLinden"); - - LLPanel::refresh(); -} - -void LLPanelLCD::apply() -{ - // nothing really to do here. -} - - -void LLPanelLCD::cancel() -{ - // doing this to restore situation when we entered this function - gSavedSettings.setS32("LCDDestination", mLCDDestination); - gSavedSettings.setBOOL("DisplayChat", mDisplayChat); - gSavedSettings.setBOOL("DisplayIM", mDisplayIM); - gSavedSettings.setBOOL("DisplayRegion", mDisplayRegion); - gSavedSettings.setBOOL("DisplayDebug", mDisplayDebug); - gSavedSettings.setBOOL("DisplayDebugConsole", mDisplayDebugConsole); - gSavedSettings.setBOOL("DisplayLinden", mDisplayLinden); -} \ No newline at end of file diff --git a/indra/newview/llpanelLCD.h b/indra/newview/llpanelLCD.h deleted file mode 100644 index 21eec3fc0..000000000 --- a/indra/newview/llpanelLCD.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file llpanelLCD.h - * @brief lcd options panel - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LL_PANEL_LCD_H -#define LL_PANEL_LCD_H - -#include "llpanel.h" - -class LLCheckBoxCtrl; - - -class LLPanelLCD : public LLPanel -{ -public: - LLPanelLCD(); - virtual ~LLPanelLCD(); - - virtual BOOL postBuild(); - virtual void refresh(); - void apply(); - void cancel(); - -protected: - S32 mLCDDestination; - BOOL mDisplayChat; - BOOL mDisplayRegion; - BOOL mDisplayDebug; - BOOL mDisplayDebugConsole; - BOOL mDisplayLinden; - BOOL mDisplayIM; - -}; - -#endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2984c8f6f..596d8d154 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1095,12 +1095,14 @@ bool idle_startup() // END TODO LLPanelLogin::close(); } - + //For HTML parsing in text boxes. LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); // Load URL History File LLURLHistory::loadFile("url_history.xml"); + // Load media plugin cookies + LLViewerMedia::loadCookieFile(); //------------------------------------------------- // Handle startup progress screen @@ -4309,7 +4311,6 @@ bool process_login_success_response(std::string& password) #endif } - // Override grid info with anything sent in the login response std::string tmp = response["gridname"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); @@ -4354,6 +4355,14 @@ bool process_login_success_response(std::string& password) gHippoGridManager->saveFile(); gHippoLimits->setLimits(); + // Start the process of fetching the OpenID session cookie for this user login + std::string openid_url = response["openid_url"]; + if(!openid_url.empty()) + { + std::string openid_token = response["openid_token"]; + LLViewerMedia::openIDSetup(openid_url, openid_token); + } + gIMMgr->loadIgnoreGroup(); bool success = false; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index a447a3330..71d3b049b 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -927,7 +927,7 @@ static bool handle_media_click(const LLPickInfo& pick) } else { - media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY); + media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE)); media_impl->mouseCapture(); // the mouse-up will happen when capture is lost } @@ -973,7 +973,7 @@ static bool handle_media_hover(const LLPickInfo& pick) { if(LLViewerMediaFocus::getInstance()->getFocus()) { - media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY); + media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE)); } // Set mouse over flag if unset diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index ab65ead4c..83a5839a9 100644 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -286,5 +286,11 @@ const char * LLURL::getFullPath() return(sReturnString); } +const char * LLURL::getAuthority() +{ + strncpy(LLURL::sReturnString,mAuthority, LL_MAX_PATH -1); /* Flawfinder: ignore */ + LLURL::sReturnString[LL_MAX_PATH -1] = '\0'; + return(sReturnString); +} char LLURL::sReturnString[LL_MAX_PATH] = ""; diff --git a/indra/newview/llurl.h b/indra/newview/llurl.h index 9a089dd83..e41b83d29 100644 --- a/indra/newview/llurl.h +++ b/indra/newview/llurl.h @@ -79,6 +79,7 @@ public: virtual const char *getFQURL() const; virtual const char *getFullPath(); + virtual const char *getAuthority(); virtual const char *updateRelativePath(const LLURL &url); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 56f0403e9..5b13d747b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -33,21 +33,31 @@ #include "llviewerprecompiledheaders.h" #include "llviewermedia.h" -#include "llviewermediafocus.h" -#include "llhoverview.h" -#include "llmimetypes.h" -#include "llviewercontrol.h" -#include "llviewerwindow.h" -#include "llviewertexturelist.h" -//#include "viewerversion.h" -#include "llpluginclassmedia.h" - -#include "llnotifications.h" +#include "llappviewer.h" +#include "lldir.h" +#include "lldiriterator.h" #include "llevent.h" // LLSimpleListener -#include "llnotificationsutil.h" -#include "lluuid.h" +#include "llhoverview.h" #include "llkeyboard.h" +#include "llmimetypes.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" +#include "llpluginclassmedia.h" +#include "llplugincookiestore.h" +#include "llurldispatcher.h" +#include "lluuid.h" +#include "llviewermediafocus.h" +#include "llviewercontrol.h" +#include "llviewertexture.h" +#include "llviewertexturelist.h" +#include "llviewerwindow.h" +#include "llwindow.h" +#include "llvieweraudio.h" +#include "llweb.h" + +#include "llfloateravatarinfo.h" // for getProfileURL() function +//#include "viewerversion.h" // Merov: Temporary definitions while porting the new viewer media code to Snowglobe const int LEFT_BUTTON = 0; @@ -75,11 +85,6 @@ public: completeAny(status, mime_type); } - virtual void error( U32 status, const std::string& reason ) - { - // completeAny(status, "none/none"); - } - void completeAny(U32 status, const std::string& mime_type) { if(!mInitialized && ! mime_type.empty()) @@ -96,8 +101,83 @@ public: viewer_media_t mMediaImpl; bool mInitialized; }; + +class LLViewerMediaOpenIDResponder : public LLHTTPClient::Responder +{ +LOG_CLASS(LLViewerMediaOpenIDResponder); +public: + LLViewerMediaOpenIDResponder( ) + { + } + + ~LLViewerMediaOpenIDResponder() + { + } + + /* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content) + { + LL_DEBUGS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL; + LL_DEBUGS("MediaAuth") << content << LL_ENDL; + std::string cookie = content["set-cookie"].asString(); + + LLViewerMedia::openIDCookieResponse(cookie); + } + + /* virtual */ void completedRaw( + U32 status, + const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + // This is just here to disable the default behavior (attempting to parse the response as llsd). + // We don't care about the content of the response, only the set-cookie header. + } + +}; + +class LLViewerMediaWebProfileResponder : public LLHTTPClient::Responder +{ +LOG_CLASS(LLViewerMediaWebProfileResponder); +public: + LLViewerMediaWebProfileResponder(std::string host) + { + mHost = host; + } + + ~LLViewerMediaWebProfileResponder() + { + } + + /* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content) + { + LL_WARNS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL; + LL_WARNS("MediaAuth") << content << LL_ENDL; + + std::string cookie = content["set-cookie"].asString(); + + LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost); + } + + void completedRaw( + U32 status, + const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + // This is just here to disable the default behavior (attempting to parse the response as llsd). + // We don't care about the content of the response, only the set-cookie header. + } + + std::string mHost; +}; + +LLPluginCookieStore *LLViewerMedia::sCookieStore = NULL; +LLURL LLViewerMedia::sOpenIDURL; +std::string LLViewerMedia::sOpenIDCookie; typedef std::list impl_list; static impl_list sViewerMediaImplList; +static std::string sUpdatedCookies; +static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt"; ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMedia @@ -105,10 +185,12 @@ static impl_list sViewerMediaImplList; ////////////////////////////////////////////////////////////////////////////////////////// // static viewer_media_t LLViewerMedia::newMediaImpl(const std::string& media_url, - const LLUUID& texture_id, - S32 media_width, S32 media_height, U8 media_auto_scale, - U8 media_loop, - std::string mime_type) + const LLUUID& texture_id, + S32 media_width, + S32 media_height, + U8 media_auto_scale, + U8 media_loop, + std::string mime_type) { LLViewerMediaImpl* media_impl = getMediaImplFromTextureID(texture_id); if(media_impl == NULL || texture_id.isNull()) @@ -255,7 +337,8 @@ void LLViewerMedia::setVolume(F32 volume) for(; iter != end; iter++) { LLViewerMediaImpl* pimpl = *iter; - pimpl->setVolume(volume); + LLPluginClassMedia* plugin = pimpl->getMediaPlugin(); + plugin->setVolume(volume); } } @@ -263,6 +346,13 @@ void LLViewerMedia::setVolume(F32 volume) // static void LLViewerMedia::updateMedia() { + sUpdatedCookies = getCookieStore()->getChangedCookies(); + if(!sUpdatedCookies.empty()) + { + lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl; + lldebugs << sUpdatedCookies << llendl; + } + impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); @@ -273,6 +363,349 @@ void LLViewerMedia::updateMedia() } } +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::clearAllCookies() +{ + // Clear all cookies for all plugins + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + LLPluginClassMedia* plugin = pimpl->getMediaPlugin(); + if(plugin) + { + plugin->clear_cookies(); + } + } + + // Clear all cookies from the cookie store + getCookieStore()->setAllCookies(""); + + // FIXME: this may not be sufficient, since the on-disk cookie file won't get written until some browser instance exits cleanly. + // It also won't clear cookies for other accounts, or for any account if we're not logged in, and won't do anything at all if there are no webkit plugins loaded. + // Until such time as we can centralize cookie storage, the following hack should cover these cases: + + // HACK: Look for cookie files in all possible places and delete them. + // NOTE: this assumes knowledge of what happens inside the webkit plugin (it's what adds 'browser_profile' to the path and names the cookie file) + + // Places that cookie files can be: + // /browser_profile/cookies + // /first_last/browser_profile/cookies (note that there may be any number of these!) + // /first_last/plugin_cookies.txt (note that there may be any number of these!) + + std::string base_dir = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter(); + std::string target; + std::string filename; + + lldebugs << "base dir = " << base_dir << llendl; + + // The non-logged-in version is easy + target = base_dir; + target += "browser_profile"; + target += gDirUtilp->getDirDelimiter(); + target += "cookies"; + lldebugs << "target = " << target << llendl; + if(LLFile::isfile(target)) + { + LLFile::remove(target); + } + + // the hard part: iterate over all user directories and delete the cookie file from each one + LLDirIterator dir_iter(base_dir, "*_*"); + while (dir_iter.next(filename)) + { + target = base_dir; + target += filename; + target += gDirUtilp->getDirDelimiter(); + target += "browser_profile"; + target += gDirUtilp->getDirDelimiter(); + target += "cookies"; + lldebugs << "target = " << target << llendl; + if(LLFile::isfile(target)) + { + LLFile::remove(target); + } + + // Other accounts may have new-style cookie files too -- delete them as well + target = base_dir; + target += filename; + target += gDirUtilp->getDirDelimiter(); + target += PLUGIN_COOKIE_FILE_NAME; + lldebugs << "target = " << target << llendl; + if(LLFile::isfile(target)) + { + LLFile::remove(target); + } + } + + // If we have an OpenID cookie, re-add it to the cookie store. + setOpenIDCookie(); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::clearAllCaches() +{ + // Clear all plugins' caches + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + pimpl->clearCache(); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::setCookiesEnabled(bool enabled) +{ + // Set the "cookies enabled" flag for all loaded plugins + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + LLPluginClassMedia* plugin = pimpl->getMediaPlugin(); + if(plugin) + { + plugin->enable_cookies(enabled); + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +///////////////////////////////////////////////////////////////////////////////////////// +// static +LLPluginCookieStore *LLViewerMedia::getCookieStore() +{ + if(sCookieStore == NULL) + { + sCookieStore = new LLPluginCookieStore; + } + + return sCookieStore; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::loadCookieFile() +{ + // build filename for each user + std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME); + + if (resolved_filename.empty()) + { + llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + return; + } + + // open the file for reading + llifstream file(resolved_filename); + if (!file.is_open()) + { + llwarns << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << llendl; + return; + } + + getCookieStore()->readAllCookies(file, true); + + file.close(); + + // send the clear_cookies message to all loaded plugins + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + LLPluginClassMedia* plugin = pimpl->getMediaPlugin(); + if(plugin) + { + plugin->clear_cookies(); + } + } + + // If we have an OpenID cookie, re-add it to the cookie store. + setOpenIDCookie(); +} + + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::saveCookieFile() +{ + // build filename for each user + std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME); + + if (resolved_filename.empty()) + { + llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + return; + } + + // open a file for writing + llofstream file (resolved_filename); + if (!file.is_open()) + { + llwarns << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << llendl; + return; + } + + getCookieStore()->writePersistentCookies(file); + + file.close(); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path, bool secure) +{ + std::stringstream cookie; + + cookie << name << "=" << LLPluginCookieStore::quoteString(value); + + if(expires.notNull()) + { + cookie << "; expires=" << expires.asRFC1123(); + } + + cookie << "; domain=" << domain; + + cookie << "; path=" << path; + + if(secure) + { + cookie << "; secure"; + } + + getCookieStore()->setCookies(cookie.str()); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path, bool secure) +{ + // A session cookie just has a NULL date. + addCookie(name, value, domain, LLDate(), path, secure); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::removeCookie(const std::string &name, const std::string &domain, const std::string &path ) +{ + // To remove a cookie, add one with the same name, domain, and path that expires in the past. + + addCookie(name, "", domain, LLDate(LLDate::now().secondsSinceEpoch() - 1.0), path); +} + + +LLSD LLViewerMedia::getHeaders() +{ + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + headers["Content-Type"] = "application/xml"; + headers["Cookie"] = sOpenIDCookie; + headers["User-Agent"] = getCurrentUserAgent(); + + return headers; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::setOpenIDCookie() +{ + if(!sOpenIDCookie.empty()) + { + // The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port] + // We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that. + // We therefore do it here. + std::string authority = sOpenIDURL.mAuthority; + std::string::size_type host_start = authority.find('@'); + if(host_start == std::string::npos) + { + // no username/password + host_start = 0; + } + else + { + // Hostname starts after the @. + // (If the hostname part is empty, this may put host_start at the end of the string. In that case, it will end up passing through an empty hostname, which is correct.) + ++host_start; + } + std::string::size_type host_end = authority.rfind(':'); + if((host_end == std::string::npos) || (host_end < host_start)) + { + // no port + host_end = authority.size(); + } + + getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start)); + + // Do a web profile get so we can store the cookie + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + headers["Cookie"] = sOpenIDCookie; + headers["User-Agent"] = getCurrentUserAgent(); + + std::string profile_url = getProfileURL(""); + LLURL raw_profile_url( profile_url.c_str() ); + + LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << llendl; + LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << llendl; + LLHTTPClient::get(profile_url, + new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()), + headers); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::openIDSetup(const std::string &openid_url, const std::string &openid_token) +{ + LL_DEBUGS("MediaAuth") << "url = \"" << openid_url << "\", token = \"" << openid_token << "\"" << LL_ENDL; + + // post the token to the url + // the responder will need to extract the cookie(s). + + // Save the OpenID URL for later -- we may need the host when adding the cookie. + sOpenIDURL.init(openid_url.c_str()); + + // We shouldn't ever do this twice, but just in case this code gets repurposed later, clear existing cookies. + sOpenIDCookie.clear(); + + LLSD headers = LLSD::emptyMap(); + // Keep LLHTTPClient from adding an "Accept: application/llsd+xml" header + headers["Accept"] = "*/*"; + // and use the expected content-type for a post, instead of the LLHTTPClient::postRaw() default of "application/octet-stream" + headers["Content-Type"] = "application/x-www-form-urlencoded"; + + // postRaw() takes ownership of the buffer and releases it later, so we need to allocate a new buffer here. + size_t size = openid_token.size(); + U8 *data = new U8[size]; + memcpy(data, openid_token.data(), size); + + LLHTTPClient::postRaw( + openid_url, + data, + size, + new LLViewerMediaOpenIDResponder(), + headers); + +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::openIDCookieResponse(const std::string &cookie) +{ + LL_DEBUGS("MediaAuth") << "Cookie received: \"" << cookie << "\"" << LL_ENDL; + + sOpenIDCookie += cookie; + + setOpenIDCookie(); +} ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerMedia::cleanupClass() @@ -309,7 +742,10 @@ LLViewerMediaImpl::LLViewerMediaImpl(const std::string& media_url, mTextureUsedWidth(0), mTextureUsedHeight(0), mSuspendUpdates(false), - mVisible(true) + mVisible(true), + mHasFocus(false), + mClearCache(false), + mBackgroundColor(LLColor4::white) { createMediaSource(); } @@ -379,10 +815,10 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height) { std::string plugin_basename = LLMIMETypes::implType(media_type); - + if(plugin_basename.empty()) { - LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; } else { @@ -391,16 +827,29 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ std::string user_data_path = gDirUtilp->getOSUserAppDir(); user_data_path += gDirUtilp->getDirDelimiter(); + // Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.) + // If the linden username returned is blank, that can only mean we are + // at the login page displaying login Web page or Web browser test via Develop menu. + // In this case we just use whatever gDirUtilp->getOSUserAppDir() gives us (this + // is what we always used before this change) + std::string linden_user_dir = gDirUtilp->getLindenUserDir(true); + if ( ! linden_user_dir.empty() ) + { + // gDirUtilp->getLindenUserDir() is whole path, not just Linden name + user_data_path = linden_user_dir; + user_data_path += gDirUtilp->getDirDelimiter(); + }; + // See if the plugin executable exists llstat s; if(LLFile::stat(launcher_name, &s)) { - LL_WARNS("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL; llassert(false); // Fail in debugging mode. } else if(LLFile::stat(plugin_name, &s)) { - LL_WARNS("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; llassert(false); // Fail in debugging mode. } else @@ -421,7 +870,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ // collect 'javascript enabled' setting from prefs and send to embedded browser bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); media_source->setJavascriptEnabled( javascript_enabled ); - + bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled ); @@ -463,7 +912,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) // and unconditionally set the mime type mMimeType = media_type; - LLPluginClassMedia* media_source = newSourceFromMediaType(media_type, this, mMediaWidth, mMediaHeight); + LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight); if (media_source) { @@ -471,6 +920,8 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setLoop(mMediaLoop); media_source->setAutoScale(mMediaAutoScale); media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); + media_source->focus(mHasFocus); + media_source->setBackgroundColor(mBackgroundColor); if(gSavedSettings.getBOOL("BrowserIgnoreSSLCertErrors")) { @@ -484,6 +935,23 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "CA.pem" ); media_source->addCertificateFilePath( ca_path ); + if(mClearCache) + { + mClearCache = false; + media_source->clear_cache(); + } + + // TODO: Only send cookies to plugins that need them + // Ideally, the plugin should tell us whether it handles cookies or not -- either via the init response or through a separate message. + // Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message, + // which could cause odd race conditions. + std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies(); + lldebugs << "setting cookies: " << all_cookies << llendl; + if(!all_cookies.empty()) + { + media_source->set_cookies(all_cookies); + } + mPluginBase = media_source; return true; @@ -585,6 +1053,8 @@ void LLViewerMediaImpl::setVolume(F32 volume) ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::focus(bool focus) { + mHasFocus = focus; + LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) { @@ -601,20 +1071,27 @@ void LLViewerMediaImpl::focus(bool focus) } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseDown(S32 x, S32 y) +bool LLViewerMediaImpl::hasFocus() const +{ + // FIXME: This might be able to be a bit smarter by hooking into LLViewerMediaFocus, etc. + return mHasFocus; +} + +void LLViewerMediaImpl::clearCache() { LLPluginClassMedia* plugin = getMediaPlugin(); - scaleMouse(&x, &y); - mLastMouseX = x; - mLastMouseY = y; - if (plugin) + if(plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, LEFT_BUTTON, x, y, 0); + plugin->clear_cache(); + } + else + { + mClearCache = true; } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseUp(S32 x, S32 y) +void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -622,12 +1099,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseMove(S32 x, S32 y) +void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -635,12 +1112,12 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y) +void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -648,7 +1125,96 @@ void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask); + } +} + + +////////////////////////////////////////////////////////////////////////////////////////// +//static +void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + F32 texture_x = texture_coords.mV[VX]; + F32 texture_y = texture_coords.mV[VY]; + + // Deal with repeating textures by wrapping the coordinates into the range [0, 1.0) + texture_x = fmodf(texture_x, 1.0f); + if(texture_x < 0.0f) + texture_x = 1.0 + texture_x; + + texture_y = fmodf(texture_y, 1.0f); + if(texture_y < 0.0f) + texture_y = 1.0 + texture_y; + + // scale x and y to texel units. + *x = llround(texture_x * plugin->getTextureWidth()); + *y = llround((1.0f - texture_y) * plugin->getTextureHeight()); + + // Adjust for the difference between the actual texture height and the amount of the texture in use. + *y -= (plugin->getTextureHeight() - plugin->getHeight()); +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseDown(x, y, mask, button); + } +} + +void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseUp(x, y, mask, button); + } +} + +void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseMove(x, y, mask); + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + scaleMouse(&x, &y); + mLastMouseX = x; + mLastMouseY = y; + if (plugin) + { + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask); + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + scaleMouse(&x, &y); + mLastMouseX = x; + mLastMouseY = y; + if (plugin) + { + plugin->scrollEvent(x, y, mask); } } @@ -658,7 +1224,7 @@ void LLViewerMediaImpl::onMouseCaptureLost() LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, mLastMouseX, mLastMouseY, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0); } } @@ -676,6 +1242,18 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask) return TRUE; } + +////////////////////////////////////////////////////////////////////////////////////////// +const std::string& LLViewerMediaImpl::getName() const +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if (plugin) + { + return plugin->getMediaName(); + } + + return LLStringUtil::null; +}; ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateHome() { @@ -787,7 +1365,7 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) if(!result) { - LLSD native_key_data = LLSD::emptyMap(); + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); result = plugin->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data); // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. @@ -810,7 +1388,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) if (uni_char >= 32 // discard 'control' characters && uni_char != 127) // SDL thinks this is 'delete' - yuck. { - LLSD native_key_data = LLSD::emptyMap(); + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); plugin->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data); } @@ -883,6 +1461,17 @@ void LLViewerMediaImpl::updateMovieImage(const LLUUID& uuid, BOOL active) void LLViewerMediaImpl::update() { LLPluginClassMedia* plugin = getMediaPlugin(); + + if(plugin) + { + // If we didn't just create the impl, it may need to get cookie updates. + if(!sUpdatedCookies.empty()) + { + // TODO: Only send cookies to plugins that need them + plugin->set_cookies(sUpdatedCookies); + } + } + if (!plugin) { return; @@ -962,21 +1551,21 @@ void LLViewerMediaImpl::updateImagesMediaStreams() } LLViewerMediaTexture* placeholder_image = (LLViewerMediaTexture*)LLViewerTextureManager::getFetchedTexture( mTextureId ); - LLPluginClassMedia* plugin = getMediaPlugin(); - placeholder_image->getLastReferencedTimer()->reset(); + LLPluginClassMedia* plugin = getMediaPlugin(); + if (mNeedsNewTexture || placeholder_image->getUseMipMaps() - || ! placeholder_image->mIsMediaTexture + || !placeholder_image->mIsMediaTexture || (placeholder_image->getWidth() != plugin->getTextureWidth()) || (placeholder_image->getHeight() != plugin->getTextureHeight()) || (mTextureUsedWidth != plugin->getWidth()) || (mTextureUsedHeight != plugin->getHeight()) ) { - llinfos << "initializing media placeholder" << llendl; - llinfos << "movie image id " << mTextureId << llendl; + LL_DEBUGS("Media") << "initializing media placeholder" << LL_ENDL; + LL_DEBUGS("Media") << "movie image id " << mTextureId << LL_ENDL; int texture_width = plugin->getTextureWidth(); int texture_height = plugin->getTextureHeight(); @@ -990,7 +1579,9 @@ void LLViewerMediaImpl::updateImagesMediaStreams() // MEDIAOPT: seems insane that we actually have to make an imageraw then // immediately discard it LLPointer raw = new LLImageRaw(texture_width, texture_height, texture_depth); - raw->clear(0x0f, 0x0f, 0x0f, 0xff); + // Clear the texture to the background color, ignoring alpha. + // convert background color channels from [0.0, 1.0] to [0, 255]; + raw->clear(int(mBackgroundColor.mV[VX] * 255.0f), int(mBackgroundColor.mV[VY] * 255.0f), int(mBackgroundColor.mV[VZ] * 255.0f), 0xff); int discard_level = 0; // ask media source for correct GL image format constants @@ -1154,6 +1745,12 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* self, LLPluginClass // Just chain the event to observers. emitEvent(self, event); } +//////////////////////////////////////////////////////////////////////////////// +// virtual +void LLViewerMediaImpl::handleCookieSet(LLPluginClassMedia* self, const std::string &cookie) +{ + LLViewerMedia::getCookieStore()->setCookies(cookie); +} //////////////////////////////////////////////////////////////////////////////// // virtual @@ -1221,3 +1818,13 @@ LLViewerMediaImpl::canPaste() const return FALSE; } +void LLViewerMediaImpl::setBackgroundColor(LLColor4 color) +{ + mBackgroundColor = color; + + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + plugin->setBackgroundColor(mBackgroundColor); + } +}; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index aebfbec76..f33b3f13a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -33,15 +33,19 @@ #ifndef LLVIEWERMEDIA_H #define LLVIEWERMEDIA_H -#include "llviewermediaeventemitter.h" -#include "llviewerpluginmanager.h" #include "llfocusmgr.h" #include "llpanel.h" +#include "llviewermediaeventemitter.h" +#include "llviewerpluginmanager.h" +#include "llpluginclassmedia.h" +#include "v4color.h" +#include "llurl.h" class LLViewerMediaImpl; class LLUUID; class LLSD; class LLViewerTexture; +class LLPluginCookieStore; typedef LLPointer viewer_media_t; @@ -72,6 +76,33 @@ class LLViewerMedia static void cleanupClass(); + // Clear all cookies for all plugins + static void clearAllCookies(); + + // Clear all plugins' caches + static void clearAllCaches(); + + // Set the "cookies enabled" flag for all loaded plugins + static void setCookiesEnabled(bool enabled); + + static LLPluginCookieStore *getCookieStore(); + static void loadCookieFile(); + static void saveCookieFile(); + static void addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path = std::string("/"), bool secure = false ); + static void addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path = std::string("/"), bool secure = false ); + static void removeCookie(const std::string &name, const std::string &domain, const std::string &path = std::string("/") ); + + static void openIDSetup(const std::string &openid_url, const std::string &openid_token); + static void openIDCookieResponse(const std::string &cookie); + + static LLSD getHeaders(); + +private: + static void setOpenIDCookie(); + + static LLPluginCookieStore *sCookieStore; + static LLURL sOpenIDURL; + static std::string sOpenIDCookie; }; // Implementation functions not exported into header file @@ -81,6 +112,8 @@ class LLViewerMediaImpl LOG_CLASS(LLViewerMediaImpl); public: + friend class LLViewerMedia; + LLViewerMediaImpl(const std::string& media_url, const LLUUID& texture_id, S32 media_width, @@ -98,9 +131,6 @@ public: LLPluginClassMedia* getMediaPlugin() const { return (LLPluginClassMedia*)mPluginBase; } void setSize(int width, int height); - // Inherited from LLViewerPluginManager. - /*virtual*/ void update(); - void play(); void stop(); void pause(); @@ -108,10 +138,16 @@ public: void seek(F32 time); void setVolume(F32 volume); void focus(bool focus); - void mouseDown(S32 x, S32 y); - void mouseUp(S32 x, S32 y); - void mouseMove(S32 x, S32 y); - void mouseLeftDoubleClick(S32 x,S32 y ); + // True if the impl has user focus. + bool hasFocus() const; + void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseMove(S32 x, S32 y, MASK mask); + void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseMove(const LLVector2& texture_coords, MASK mask); + void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0); + void scrollWheel(S32 x, S32 y, MASK mask); void mouseCapture(); void navigateHome(); @@ -124,11 +160,14 @@ public: std::string getMediaURL() { return mMediaURL; } std::string getHomeURL() { return mHomeURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; } + void clearCache(); std::string getMimeType() { return mMimeType; } void getTextureSize(S32 *texture_width, S32 *texture_height); void scaleMouse(S32 *mouse_x, S32 *mouse_y); + void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y); void updateMovieImage(const LLUUID& image_id, BOOL active); + void update(); void updateImagesMediaStreams(); LLUUID getMediaTextureID(); @@ -166,7 +205,7 @@ public: /*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) { return FALSE; }; /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }; /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; }; - /*virtual*/ const std::string& getName() const { return LLStringUtil::null; }; + /*virtual*/ const std::string& getName() const; /*virtual*/ BOOL isView() const { return FALSE; }; /*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {}; /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {}; @@ -174,6 +213,7 @@ public: // Inherited from LLPluginClassMediaOwner /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, LLPluginClassMediaOwner::EMediaEvent); + /*virtual*/ void handleCookieSet(LLPluginClassMedia* self, const std::string &cookie); // LLEditMenuHandler overrides /*virtual*/ void cut(); @@ -184,8 +224,10 @@ public: /*virtual*/ void paste(); /*virtual*/ BOOL canPaste() const; - -public: + + bool mNeedsNewTexture; + void setBackgroundColor(LLColor4 color); +private: // a single media url with some data and an impl. LLUUID mTextureId; bool mMovieImageHasMips; @@ -198,11 +240,13 @@ public: S32 mMediaHeight; bool mMediaAutoScale; bool mMediaLoop; - bool mNeedsNewTexture; S32 mTextureUsedWidth; S32 mTextureUsedHeight; bool mSuspendUpdates; bool mVisible; + bool mHasFocus; + bool mClearCache; + LLColor4 mBackgroundColor; private: /*LLViewerMediaTexture*/LLViewerTexture *updatePlaceholderImage(); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 4166cc5f2..98962a0fa 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -62,9 +62,6 @@ #include "llviewernetwork.h" #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived #include "sgmemstat.h" -#if LL_LCD_COMPILE -#include "lllcd.h" -#endif class StatAttributes @@ -201,10 +198,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = // ST_TEX_BAKES StatAttributes("Texture Bakes", FALSE, FALSE), // ST_TEX_REBAKES - StatAttributes("Texture Rebakes", FALSE, FALSE), - - // ST_LOGITECH_KEYBOARD - StatAttributes("Logitech LCD", FALSE, FALSE) + StatAttributes("Texture Rebakes", FALSE, FALSE) }; @@ -699,14 +693,6 @@ void update_statistics(U32 frame_count) mem_stats_timer.reset(); } } - - -#if LL_LCD_COMPILE - bool LCDenabled = gLcdScreen->Enabled(); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, LCDenabled); -#else - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, false); -#endif } class ViewerStatsResponder : public LLHTTPClient::Responder diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index ec91b7efd..93d482da7 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -181,9 +181,8 @@ public: ST_WINDOW_HEIGHT = 55, ST_TEX_BAKES = 56, ST_TEX_REBAKES = 57, - ST_LOGITECH_LCD = 58, - ST_COUNT = 59 + ST_COUNT = 58 }; @@ -282,7 +281,7 @@ public: }; StatsAccumulator mAgentPositionSnaps; - + private: F64 mStats[ST_COUNT]; diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 28bfe034a..4dbcfc578 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -35,11 +35,20 @@ #include "llweb.h" -#include "llviewerwindow.h" -#include "llwindow.h" +// Library includes +#include "llwindow.h" // spawnWebBrowser() -#include "llviewercontrol.h" +#include "llagent.h" +#include "llappviewer.h" #include "llfloatermediabrowser.h" +#include "llparcel.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" +#include "llviewerwindow.h" + +#include "sgversion.h" // static void LLWeb::initClass() @@ -125,6 +134,64 @@ std::string LLWeb::escapeURL(const std::string& url) return escaped_url; } +//static +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) +{ + gCurrentVersion = llformat("%s %d.%d.%d.%d", + gVersionChannel, + gVersionMajor, + gVersionMinor, + gVersionPatch, + gVersionBuild ); + + LLSD substitution = default_subs; + substitution["VERSION"] = gCurrentVersion; + substitution["VERSION_MAJOR"] = gVersionMajor; + substitution["VERSION_MINOR"] = gVersionMinor; + substitution["VERSION_PATCH"] = gVersionPatch; + substitution["VERSION_BUILD"] = gVersionBuild; + substitution["CHANNEL"] = gVersionChannel; + substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["SESSION_ID"] = gAgent.getSessionID(); + substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); + + // work out the current language + std::string lang = LLUI::getLanguage(); + if (lang == "en-us") + { + // *HACK: the correct fix is to change English.lproj/language.txt, + // but we're late in the release cycle and this is a less risky fix + lang = "en"; + } + substitution["LANGUAGE"] = lang; + + // find the region ID + LLUUID region_id; + LLViewerRegion *region = gAgent.getRegion(); + if (region) + { + region_id = region->getRegionID(); + } + substitution["REGION_ID"] = region_id; + + // find the parcel local ID + S32 parcel_id = 0; + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (parcel) + { + parcel_id = parcel->getLocalID(); + } + substitution["PARCEL_ID"] = llformat("%d", parcel_id); + + // expand all of the substitution strings and escape the url + std::string expanded_url = url; + LLStringUtil::format(expanded_url, substitution); + + return LLWeb::escapeURL(expanded_url); +} + // virtual void LLWeb::URLLoader::load(const std::string& url) { diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index 8dd13ffcb..73f5c7ebe 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -57,6 +57,10 @@ public: // Returns escaped (eg, " " to "%20") url static std::string escapeURL(const std::string& url); + /// Expands various strings like [LANG], [VERSION], etc. in a URL + static std::string expandURLSubstitutions(const std::string &url, + const LLSD &default_subs); + class URLLoader : public LLAlertDialog::URLLoader { virtual void load(const std::string& url); diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index 71b0db7db..8bf50b84b 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -263,1571 +263,2490 @@ Load Files Choose Directory - - - + + Sleeps script for [SLEEP_TIME] seconds. - + - + float llSin(float theta) Returns the sine of theta (theta in radians) - - + + float llCos(float theta) Returns the cosine of theta (theta in radians) - - + + float llTan(float theta) Returns the tangent of theta (theta in radians) - - + + float llAtan2(float y, float x) Returns the arctangent2 of y, x - - + + float llSqrt(float val) Returns the square root of val, or returns 0 and triggers a Math Error for imaginary results - - + + float llPow(float base, float exponent) Returns the base raised to the power exponent, or returns 0 and triggers Math Error for imaginary results - - + + integer llAbs(integer val) Returns the positive version of val - - + + float llFabs(float val) Returns the positive version of val - - + + float llFrand(float mag) Returns a pseudo random number in the range [0,mag) or (mag,0] - - + + integer llFloor(float val) Returns largest integer value <= val - - + + integer llCeil(float val) Returns smallest integer value >= val - - + + integer llRound(float val) Returns val rounded to the nearest integer - - + + float llVecMag(vector v) Returns the magnitude of v - - + + vector llVecNorm(vector v) Returns the v normalized - - + + float llVecDist(vector v1, vector v2) Returns the 3D distance between v1 and v2 - - + + vector llRot2Euler(rotation q) Returns the Euler representation (roll, pitch, yaw) of q - - + + rotation llEuler2Rot(vector v) Returns the rotation representation of Euler Angles v - - + + rotation llAxes2Rot(vector fwd, vector left, vector up) Returns the rotation defined by the coordinate axes - - + + vector llRot2Fwd(rotation q) Returns the forward vector defined by q - - + + vector llRot2Left(rotation q) Returns the left vector defined by q - - + + vector llRot2Up(rotation q) Returns the up vector defined by q - - + + rotation llRotBetween(vector v1, vector v2) Returns the rotation to rotate v1 to v2 - - + + llWhisper(integer channel, string msg) Whispers the text of msg on channel - - + + llSay(integer channel, string msg) Says the text of msg on channel - - + + llShout(integer channel, string msg) Shouts the text of msg on channel - - + + integer llListen(integer channel, string name, key id, string msg) Sets a callback for msg on channel from name and id (name, id, and/or msg can be empty) and returns an identifier that can be used to deactivate or remove the listen - - + + llListenControl(integer number, integer active) Makes a listen event callback active or inactive - - + + llListenRemove(integer number) Removes listen event callback number - - + + llSensor(string name, key id, integer type, float range, float arc) Performs a single scan for name and id with type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within range meters and arc radians of forward vector (name, id, and/or keytype can be empty or 0) - - + + llSensorRepeat(string name, key id, integer type, float range, float arc, float rate) Sets a callback for name and id with type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within range meters and arc radians of forward vector (name, id, and/or keytype can be empty or 0) and repeats every rate seconds - - + + llSensorRemove() Removes the sensor setup by llSensorRepeat - - + + string llDetectedName(integer number) Returns the name of detected object number (returns empty string if number is not a valid sensed object) - - + + key llDetectedKey(integer number) Returns the key of detected object number (returns empty key if number is not a valid sensed object) - - + + key llDetectedOwner(integer number) Returns the key of detected object's owner (returns empty key if number is not a valid sensed object) - - + + integer llDetectedType(integer number) Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of detected object (returns 0 if number is not a valid sensed object) - - + + vector llDetectedPos(integer number) Returns the position of detected object number (returns <0,0,0> if number is not a valid sensed object) - - + + vector llDetectedVel(integer number) Returns the velocity of detected object number (returns <0,0,0> if number is not a valid sensed object) - - + + vector llDetectedGrab(integer number) Returns the grab offset of the user touching object (returns <0,0,0> if number is not a valid sensed object) - - + + rotation llDetectedRot(integer number) Returns the rotation of detected object number (returns <0,0,0,1> if number is not a valid sensed object) - - + + integer llDetectedGroup(integer number) Returns TRUE if detected object is part of same group as owner - - + + integer llDetectedLinkNumber(integer number) Returns the link position of the triggered event for touches and collisions only - - + + llDie() Deletes the object - - + + float llGround(vector offset) Returns the ground height below the object position + offset - - + + float llCloud(vector offset) Returns the cloud density at the object position + offset - - + + vector llWind(vector offset) Returns the wind velocity at the object position + offset - - + + llSetStatus(integer status, integer value) Sets status (STATUS_PHYSICS, STATUS_PHANTOM, STATUS_BLOCK_GRAB, STATUS_ROTATE_X, STATUS_ROTATE_Y, and/or STATUS_ROTATE_Z) to value - - + + integer llGetStatus(integer status) Returns value of status (STATUS_PHYSICS, STATUS_PHANTOM, STATUS_BLOCK_GRAB, STATUS_ROTATE_X, STATUS_ROTATE_Y, and/or STATUS_ROTATE_Z) - - + + llSetScale(vector scale) Sets the scale of the prim - - + + vector llGetScale() Returns the scale of the prim - - + + llSetColor(vector color, integer face) Sets the color on face of the prim - - + + float llGetAlpha(integer face) Returns the alpha of face - - + + llSetAlpha(float alpha, integer face) Sets the alpha on face - - + + vector llGetColor(integer face) Returns the color on face - - + + llSetTexture(string texture, integer face) Sets the texture of face or ALL_SIDES - - + + llScaleTexture(float u, float v, integer face) Sets the texture u & v scales for the chosen face or ALL_SIDES - - + + llOffsetTexture(float u, float v, integer face) Sets the texture u & v offsets for the chosen face or ALL_SIDES - - + + llRotateTexture(float rotation, integer face) Sets the texture rotation for the chosen face - - + + string llGetTexture(integer face) Returns a string that is the texture on face (the inventory name if it is a texture in the prim's inventory, otherwise the key) - - + + llSetPos(vector pos) Moves the object or prim towards pos without using physics (if the script isn't physical) - - + + vector llGetPos() Returns the position of the task in region coordinates - - + + vector llGetLocalPos() Returns the position relative to the root - - + + llSetRot(rotation rot) Sets the rotation - - + + rotation llGetRot() Returns the rotation relative to the region's axes - - + + rotation llGetLocalRot() Returns the rotation local to the root - - + + llSetForce(vector force, integer local) Applies force to the object (if the script is physical), in local coords if local == TRUE - - + + vector llGetForce() Returns the force (if the script is physical) - - + + integer llTarget(vector position, float range) Sets positions within range of position as a target and return an ID for the target - - + + llTargetRemove(integer number) Removes positional target number registered with llTarget - - + + integer llRotTarget(rotation rot, float error) Set rotations with error of rot as a rotational target and return an ID for the rotational target - - + + llRotTargetRemove(integer number) Removes rotational target number registered with llRotTarget - - + + llMoveToTarget(vector target, float tau) Critically damps to target in tau seconds (if the script is physical) - - + + llStopMoveToTarget() Stops critically damped motion - - + + llApplyImpulse(vector force, integer local) Applies impulse to object (if the script is physical), in local coords if local == TRUE - - + + llApplyRotationalImpulse(vector force, integer local) Applies rotational impulse to object (if the script is physical), in local coords if local == TRUE - - + + llSetTorque(vector torque, integer local) Sets the torque of object (if the script is physical), in local coords if local == TRUE - - + + vector llGetTorque() Returns the torque (if the script is physical) - - + + llSetForceAndTorque(vector force, vector torque, integer local) Sets the force and torque of object (if the script is physical), in local coords if local == TRUE - - + + vector llGetVel() Returns the velocity of the object - - + + vector llGetAccel() Returns the acceleration of the object relative to the region's axes - - + + vector llGetOmega() Returns the rotation velocity in radians per second - - + + float llGetTimeOfDay() Returns the time in seconds since [SECOND_LIFE] server midnight or since region up-time, whichever is smaller - - + + float llGetWallclock() Returns the time in seconds since midnight California Pacific time (PST/PDT) - - + + float llGetTime() Returns the time in seconds since the last region reset, script reset, or call to either llResetTime or llGetAndResetTime - - + + llResetTime() Sets the script timer to zero - - + + float llGetAndResetTime() Returns the script time in seconds and then resets the script timer to zero - - + + llSound(string sound, float volume, integer queue, integer loop) Plays sound at volume and whether it should loop or not - - + + llPlaySound(string sound, float volume) Plays attached sound once at volume (0.0 - 1.0) - - + + llLoopSound(string sound, float volume) Plays attached sound looping indefinitely at volume (0.0 - 1.0) - - + + llLoopSoundMaster(string sound, float volume) Plays attached sound looping at volume (0.0 - 1.0), declares it a sync master - - + + llLoopSoundSlave(string sound, float volume) Plays attached sound looping at volume (0.0 - 1.0), synced to most audible sync master - - + + llPlaySoundSlave(string sound, float volume) Plays attached sound once at volume (0.0 - 1.0), synced to next loop of most audible sync master - - + + llTriggerSound(string sound, float volume) Plays sound at volume (0.0 - 1.0), centered at but not attached to object - - + + llStopSound() Stops currently attached sound - - + + llPreloadSound(string sound) Preloads a sound on viewers within range - - + + string llGetSubString(string src, integer start, integer end) Returns the indicated substring - - + + string llDeleteSubString(string src, integer start, integer end) Removes the indicated substring and returns the result - - + + string llInsertString(string dst, integer position, string src) Returns a destination string dst with the string src inserted starting at position pos - - + + string llToUpper(string src) Returns a string that is src with all upper-case characters - - + + string llToLower(string src) Returns a string that is src with all lower-case characters - - + + llGiveMoney(key destination, integer amount) Transfers amount of [CURRENCY] from script owner to destination - - + + llMakeExplosion(integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset) Makes a round explosion of particles - - + + llMakeFountain(integer particles, float scale, float vel, float lifetime, float arc, integer bounce, string texture, vector offset, float bounce_offset) Makes a fountain of particles - - + + llMakeSmoke(integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset) Makes smoke like particles - - + + llMakeFire(integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset) Makes fire like particles - - + + llRezObject(string inventory, vector pos, vector vel, rotation rot, integer param) Instantiates owner's inventory object at pos with velocity vel and rotation rot with start parameter param - - + + llLookAt(vector target, float strength, float damping) Causes object to point its up axis (positive z) towards target, while keeping its forward axis (positive x) below the horizon - - + + llStopLookAt() Stops causing object to point at a target - - + + llSetTimerEvent(float sec) Causes the timer event to be triggered a maximum of once every sec seconds - - + + llSleep(float sec) Puts the script to sleep for sec seconds - - + + float llGetMass() Returns the mass of object that the script is attached to - - + + llCollisionFilter(string name, key id, integer accept) Sets the collision filter, exclusively or inclusively. If accept == TRUE, only accept collisions with objects name and id (either is optional), otherwise with objects not name or id - - + + llTakeControls(integer controls, integer accept, integer pass_on) Allows for intercepting keyboard and mouse clicks from the agent the script has permissions for - - + + llReleaseControls() Stops taking inputs that were taken with llTakeControls - - + + llAttachToAvatar(integer attach_point) Attaches the object to the avatar who has granted permission to the script - - + + llDetachFromAvatar() Detaches object from avatar - - + + llTakeCamera(key avatar) Moves avatar's viewpoint to task - - + + llReleaseCamera(key avatar) Returns camera to agent avatar - - + + key llGetOwner() Returns the object owner's UUID - - + + llInstantMessage(key user, string message) Sends the specified string as an Instant Message to the user - + llEmail(string address, string subject, string message) Sends an email to address with the subject and message - + llGetNextEmail(string address, string subject) Gets the next waiting email that comes from address, with specified subject - - + + key llGetKey() Returns the key of the prim the script is attached to - - + + llSetBuoyancy(float buoyancy) Sets the buoyancy of the task or object (0 is disabled, < 1.0 sinks, 1.0 floats, > 1.0 rises) - - + + llSetHoverHeight(float height, integer water, float tau) Critically damps to a height above the ground (or water) in tau seconds - - + + llStopHover() Stops hovering to a height - - + + llMinEventDelay(float delay) Sets the minimum time between events being handled - - + + llSoundPreload(string sound) Preloads a sound on viewers within range - - + + llRotLookAt(rotation target, float strength, float damping) Causes object to point its forward axis towards target - - + + integer llStringLength(string str) Returns the length of string - - + + llStartAnimation(string anim) Starts animation anim for agent that granted PERMISSION_TRIGGER_ANIMATION if the permission has not been revoked - - + + llStopAnimation(string anim) Stops animation anim for agent that granted permission - - + + llPointAt(vector pos) Makes agent that owns object point at pos - - + + llStopPointAt() Stops pointing agent that owns object - - + + llTargetOmega(vector axis, float spinrate, float gain) Rotates the object around axis at spinrate with strength gain - - + + integer llGetStartParameter() Returns an integer that is the script start/rez parameter - - + + llGodLikeRezObject(key inventory, vector pos) Rezzes directly off of UUID if owner is in God Mode - - + + llRequestPermissions(key agent, integer perm) Asks the agent for permission to run certain classes of functions - - + + key llGetPermissionsKey() Returns the key of the avatar that last granted permissions to the script - - + + integer llGetPermissions() Returns an integer bitfield with the permissions that have been granted - - + + integer llGetLinkNumber() Returns the link number of the prim containing the script (0 means not linked, 1 the prim is the root, 2 the prim is the first child, etc) - - + + llSetLinkColor(integer linknumber, vector color, integer face) Sets face to color if a task exists in the link chain at linknumber - - + + llCreateLink(key target, integer parent) Attempts to link the script's object with the target (requires that PERMISSION_CHANGE_LINKS be granted). If parent == TRUE, then the script's object becomes the root - - + + llBreakLink(integer linknum) Delinks the prim with the given link number in a linked object set (requires that PERMISSION_CHANGE_LINKS be granted) - - + + llBreakAllLinks() Delinks all prims in the link set (requires that PERMISSION_CHANGE_LINKS be granted) - - + + key llGetLinkKey(integer linknumber) Returns the key of the linked prim linknumber - - + + string llGetLinkName(integer linknumber) Returns the name of linknumber in a link set - - + + integer llGetInventoryNumber(integer type) Returns the number of items of a given type (INVENTORY_* flag) in the prim's inventory - - + + string llGetInventoryName(integer type, integer number) Returns the name of the inventory item number of a given type - - + + llSetScriptState(string name, integer run) Sets the running state of the specified script - - + + float llGetEnergy() Returns how much energy is in the object as a percentage of maximum - - + + llGiveInventory(key destination, string inventory) Gives inventory to destination - - + + llRemoveInventory(string item) Removes the named inventory item - - + + llSetText(string text, vector color, float alpha) Displays text that hovers over the prim with specific color and translucency specified with alpha - - + + float llWater(vector offset) Returns the water height below the object position + offset - - + + llPassTouches(integer pass) If pass == TRUE, touches are passed from children on to parents - - + + key llRequestAgentData(key id, integer data) Requests data about agent id. When data is available the dataserver event will be raised. - - + + key llRequestInventoryData(string name) Requests data from object's inventory object. When data is available the dataserver event will be raised. - - + + llSetDamage(float damage) Sets the amount of damage that will be done when this object hits an avatar. - - + + llTeleportAgentHome(key id) Teleports avatar on the owner's land to their home location without any warning - - + + llModifyLand(integer action, integer brush) Modifies land using the specified action on the specified brush size of land - - + + llCollisionSound(string impact_sound, float impact_volume) Suppresses default collision sounds, replaces default impact sounds with impact_sound at the volume impact_volume - - + + llCollisionSprite(string impact_sprite) Suppresses default collision sprites, replaces default impact sprite with impact_sprite (use an empty string to just suppress) - - + + string llGetAnimation(key id) Returns the name of the currently playing locomotion animation for avatar id - - + + llResetScript() Resets the script - - + + llMessageLinked(integer linknum, integer num, string str, key id) Allows scripts in the same object to communicate. Triggers a link_message event with the same parameters num, str, and id in all scripts in the prim(s) described by linknum. - - + + llPushObject(key id, vector impulse, vector ang_impulse, integer local) Applies impulse and ang_impulse to object id - - + + llPassCollisions(integer pass) If pass == TRUE, collisions are passed from children on to parents (default is FALSE) - - + + string llGetScriptName() Returns the name of the script that this function is used in - - + + integer llGetNumberOfSides() Returns the number of faces (or sides) of the prim - - + + rotation llAxisAngle2Rot(vector axis, float angle) Returns the rotation that is a generated angle about axis - - + + vector llRot2Axis(rotation rot) Returns the rotation axis represented by rot - - + + float llRot2Angle(rotation rot) Returns the rotation angle represented by rot - - + + float llAcos(float val) Returns the arccosine in radians of val - - + + float llAsin(float val) Returns the arcsine in radians of val - - + + float llAngleBetween(rotation a, rotation b) Returns angle between rotation a and b - - + + key llGetInventoryKey(string name) Returns the key that is the UUID of the inventory name - - + + llAllowInventoryDrop(integer add) If add == TRUE, users without modify permissions can still drop inventory items onto a prim - - + + vector llGetSunDirection() Returns a normalized vector of the direction of the sun in the region - - + + vector llGetTextureOffset(integer face) Returns the texture offset of face in the x and y components of a vector - - + + vector llGetTextureScale(integer side) Returns the texture scale of side in the x and y components of a vector - - + + float llGetTextureRot(integer side) Returns the texture rotation of side - - + + integer llSubStringIndex(string source, string pattern) Returns an integer that is the index in source where pattern first appears. (Returns -1 if not found) - - + + key llGetOwnerKey(key id) Returns the owner of object id - - + + vector llGetCenterOfMass() Returns the prim's center of mass (unless called from the root prim, where it returns the object's center of mass) - - + + list llListSort(list src, integer stride, integer ascending) Sorts the list into blocks of stride, in ascending order if ascending == TRUE. The sort order is affected by type. - - + + integer llGetListLength(list src) Returns the number of elements in the list - - + + integer llList2Integer(list src, integer index) Copies the integer at index in the list - - + + float llList2Float(list src, integer index) Copies the float at index in the list - - + + string llList2String(list src, integer index) Copies the string at index in the list - - + + key llList2Key(list src, integer index) Copies the key at index in the list - - + + vector llList2Vector(list src, integer index) Copies the vector at index in the list - - + + rotation llList2Rot(list src, integer index) Copies the rotation at index in the list - - + + list llList2List(list src, integer start, integer end) Copies the slice of the list from start to end - - + + list llDeleteSubList(list src, integer start, integer end) Removes the slice from start to end and returns the remainder of the list - - + + integer llGetListEntryType(list src, integer index) Returns the type of the index entry in the list (TYPE_INTEGER, TYPE_FLOAT, TYPE_STRING, TYPE_KEY, TYPE_VECTOR, TYPE_ROTATION, or TYPE_INVALID if index is off list) - - + + string llList2CSV(list src) Creates a string of comma separated values from list - - + + list llCSV2List(string src) Creates a list from a string of comma separated values - - + + list llListRandomize(list src, integer stride) Returns a randomized list of blocks of size stride - - + + list llList2ListStrided(list src, integer start, integer end, integer stride) Copies the strided slice of the list from start to end - - + + vector llGetRegionCorner() Returns a vector in meters that is the global location of the south-west corner of the region which the object is in - - + + list llListInsertList(list dest, list src, integer start) Returns a list that contains all the elements from dest but with the elements from src inserted at position start - - + + integer llListFindList(list src, list test) Returns the index of the first instance of test in src. (Returns -1 if not found) - - + + string llGetObjectName() Returns the name of the prim which the script is attached to - - + + llSetObjectName(string name) Sets the prim's name to the name parameter - - + + string llGetDate() Returns the current date in the UTC time zone in the format YYYY-MM-DD - - + + integer llEdgeOfWorld(vector pos, vector dir) Checks to see whether the border hit by dir from pos is the edge of the world (has no neighboring region) - - + + integer llGetAgentInfo(key id) Returns an integer bitfield containing the agent information about id. Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING and/or AGENT_IN_AIR. - - + + llAdjustSoundVolume(float volume) Adjusts volume of attached sound (0.0 - 1.0) - - + + llSetSoundQueueing(integer queue) Sets whether attached sounds wait for the current sound to finish (If queue == TRUE then queuing is enabled, if FALSE queuing is disabled [default]) - - + + llSetSoundRadius(float radius) Establishes a hard cut-off radius for audibility of scripted sounds (both attached and triggered) - - + + string llKey2Name(key id) Returns the name of the prim or avatar specified by id. (The id must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned.) - - + + llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate) Animates the texture on the specified face/faces - - + + llTriggerSoundLimited(string sound, float volume, vector top_north_east, vector bottom_south_west) Plays sound at volume (0.0 - 1.0), centered at but not attached to object, limited to the box defined by vectors top_north_east and bottom_south_west - - + + llEjectFromLand(key avatar) Ejects avatar from the parcel - - + + list llParseString2List(string src, list separators, list spacers) Breaks src into a list, discarding separators, keeping spacers (separators and spacers must be lists of strings, maximum of 8 each) - - + + integer llOverMyLand(key id) Returns TRUE if id is over land owned by the script owner, otherwise FALSE - - + + key llGetLandOwnerAt(vector pos) Returns the key of the land owner, returns NULL_KEY if public - - + + key llGetNotecardLine(string name, integer line) Returns line line of notecard name via the dataserver event - - + + vector llGetAgentSize(key id) If the avatar is in the same region, returns the size of the bounding box of the requested avatar by id, otherwise returns ZERO_VECTOR - - + + integer llSameGroup(key id) Returns TRUE if avatar id is in the same region and has the same active group, otherwise FALSE - - + + key llUnSit(key id) If avatar identified by id is sitting on the object the script is attached to or is over land owned by the object's owner, the avatar is forced to stand up - - + + vector llGroundSlope(vector offset) Returns the ground slope below the object position + offset - - + + vector llGroundNormal(vector offset) Returns the ground normal below the object position + offset - - + + vector llGroundCountour(vector offset) Returns the ground contour direction below the object position + offset - - + + integer llGetAttached() Returns the object's attachment point, or 0 if not attached - - + + integer llGetFreeMemory() Returns the number of free bytes of memory the script can use - - + + string llGetRegionName() Returns the current region name - - + + float llGetRegionTimeDilation() Returns the current time dilation as a float between 0.0 (full dilation) and 1.0 (no dilation) - - + + float llGetRegionFPS() Returns the mean region frames per second - - + + llParticleSystem(list rules) -Creates a particle system based on rules. An empty list removes the particle system. +Creates a particle system based on rules. An empty list removes the particle system. List format is [ rule1, data1, rule2, data2 . . . rulen, datan ] - - + + llGroundRepel(float height, integer water, float tau) Critically damps to height if within height*0.5 of level (either above ground level, or above the higher of land and water if water == TRUE) - - + + llGiveInventoryList(key target, string folder, list inventory) Gives inventory items to target, creating a new folder to put them in - - + + llSetVehicleType(integer type) Sets the vehicle to one of the default types - - + + llSetVehicleFloatParam(integer param, float value) Sets the specified vehicle float parameter - - + + llSetVehicleVectorParam(integer param, vector vec) Sets the specified vehicle vector parameter - - + + llSetVehicleVectorParam(integer param, rotation rot) Sets the specified vehicle rotation parameter - - + + llSetVehicleFlags(integer flags) Sets the enabled bits in 'flags' - - + + llRemoveVehicleFlags(integer flags) Removes the enabled bits in 'flags' - - + + llSitTarget(vector offset, rotation rot) -Sets the sit location for the prim. If offset == <0,0,0> then the sit target is removed. - - +Sets the sit location for the prim. If offset == <0,0,0> then the sit target is removed. + + key llAvatarOnSitTarget() If an avatar is seated on the sit target, returns the avatar's key, otherwise NULL_KEY - - + + llAddToLandPassList(key avatar, float hours) Adds avatar to the land pass list for hours, or indefinitely if hours is 0 - - + + llSetTouchText(string text) Displays text rather than the default 'Touch' in the pie menu - - + + llSetSitText(string text) Displays text rather than the default 'Sit Here' in the pie menu - - + + llSetCameraEyeOffset(vector offset) Sets the camera eye offset for avatars that sit on the object - - + + llSetCameraAtOffset(vector offset) Sets the point the camera is looking at to offset for avatars that sit on the object - - + + string llDumpList2String(list src, string separator) Returns the list in a single string, using separator between the entries - - + + integer llScriptDanger(vector pos) Returns TRUE if pos is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts - - + + llDialog(key avatar, string message, list buttons, integer chat_channel Shows a dialog box on the avatar's screen with a message and up to 12 buttons. If a button is pressed, the avatar says the text of the button label on chat_channel. - - + + llVolumeDetect(integer detect) If detect = TRUE, object works much like Phantom, but triggers collision_start and collision_end events when other objects start and stop interpenetrating. Must be applied to the root prim. - - + + llResetOtherScript(string name) Resets script name - - + + integer llGetScriptState(string name) Returns TRUE if the script name is running - - + + DEPRECATED! Please use llRemoteLoadScriptPin instead. - - + + llSetRemoteScriptAccessPin(integer pin) If pin is set to a non-zero number, allows a prim to have scripts remotely loaded via llRemoteLoadScriptPin when it passes in the correct pin. Otherwise, llRemoteLoadScriptPin is ignored. - - + + llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param) Copies script name onto target, if the owner of this scripted object can modify target and is in the same region, and the matching pin is used. If running == TRUE, starts the script with start_param - - + + llOpenRemoteDataChannel() Creates a channel to listen for XML-RPC calls, and will trigger a remote_data event with channel id once it is available - - + + key llSendRemoteData(key channel, string dest, integer idata, string sdata) Sends an XML-RPC request to dest through channel with payload of channel (in a string), integer idata and string sdata. Returns a key that is the message_id for the resulting remote_data events. - - + + llRemoteDataReply(key channel, key message_id, string sdata, integer idata) Sends an XML-RPC reply to message_id on channel with payload of string sdata and integer idata - - + + llCloseRemoteDataChannel(key channel) Closes XML-RPC channel - - + + string llMD5String(string src, integer nonce) Returns a string of 32 hex characters that is a RSA Data Security, Inc. MD5 Message-Digest Algorithm of src with nonce - - + + llSetPrimitiveParams(list rules) Sets the prim's parameters according to rules - - + + string llStringToBase64(string str) Converts a string to the Base64 representation of the string - - + + string llBase64ToString(string str) Converts a Base64 string to a conventional string. If the conversion creates any unprintable characters, they are converted to spaces. - - + + string llXorBase64Strings(string s1, string s2) DEPRECATED! Please use llXorBase64StringsCorrect instead. Incorrectly performs an exclusive or on two Base64 strings and returns a Base64 string. s2 repeats if it is shorter than s1. Retained for backwards compatability. - - + + llRemoteDataSetRegion() DEPRECATED! Please use llOpenRemoteDataChannel instead. If an object using remote data channels changes regions, you must call this function to reregister the remote data channels. This call is not needed if the prim does not change regions. - - + + float llLog10(float val) Returns the base 10 logarithm of val. Returns zero if val <= 0. - - + + float llLog(float val) Returns the natural logarithm of val. Returns zero if val <= 0. - - + + list llGetAnimationList(key id) Returns a list of keys of playing animations for avatar described by id - - + + llSetParcelMusicURL(string url) Sets the streaming audio URL for the parcel which the object is on - - + + vector llGetRootPosition() Returns the position (in region coordinates) of the root prim of the object which the script is attached to - - + + rotation llGetRootRotation() Returns the rotation (relative to the region) of the root prim of the object which the script is attached to - - + + string llGetObjectDesc() Returns the description of the prim the script is attached to - - + + llSetObjectDesc(string name) Sets the prim's description - - + + key llGetCreator() Returns a key for the creator of the prim - - + + string llGetTimestamp() Returns the timestamp in the UTC time zone in the format: YYYY-MM-DDThh:mm:ss.ff..fZ - - + + llSetLinkAlpha(integer linknumber, float alpha, integer face) If a prim exists in the link chain at linknumber, sets face to alpha - - + + integer llGetNumberOfPrims() Returns the number of prims in a link set the script is attached to - - + + key llGetNumberOfNotecardLines(string name) Returns number of lines in notecard name via the dataserver event (cast return value to integer) - - + + list llGetBoundingBox(key object) Returns the bounding box around the object (including any linked prims) relative to its root prim, in a list in the format [ (vector) min_corner, (vector) max_corner ] - - + + vector llGetGeometricCenter() Returns the geometric center of the linked set the script is attached to. - - + + list llGetPrimitiveParams(list params) Returns the primitive parameters specified in the params list. - - + + string llIntegerToBase64(integer number) Returns a string that is a Base64 big endian encode of number - - + + integer llBase64ToInteger(string str) Returns an integer that is the str Base64 decoded as a big endian integer - - + + float llGetGMTclock() Returns the time in seconds since midnight GMT - - + + string llGetSimulatorHostname() Returns the hostname of the machine which the script is running on (same as string in viewer Help dialog) - - + + llSetLocalRot(rotation rot) Sets the rotation of a child prim relative to the root prim - - + + list llParseStringKeepNulls(string src, list separators, list spacers) Breaks src into a list, discarding separators, keeping spacers, keeping any null values generated. (separators and spacers must be lists of strings, maximum of 8 each) - - + + llRezAtRoot(string inventory, vector pos, vector vel, rotation rot, integer param) Instantiates owner's inventory object rotated to rot with its root at pos, moving at vel, using param as the start parameter - - + + integer llGetObjectPermMask(integer mask) Returns the requested permission mask for the root object the task is attached to - - + + llSetObjectPermMask(integer mask, integer value) Sets the given permission mask to the new value on the root object the task is attached to (requires God Mode) - - + + integer llGetInventoryPermMask(string item, integer mask) Returns the requested permission mask for the inventory item - - + + llSetInventoryPermMask(string item, integer mask, integer value) Sets the given permission mask to the new value on the inventory item (requires God Mode) - - + + key llGetInventoryCreator(string item) Returns a key for the creator of the inventory item - - + + llOwnerSay(string msg) Says msg to owner only. (Owner must be in the same region.) - - + + key llRequestSimulatorData(string simulator, integer data) Requests data about simulator. When data is available the dataserver event will be raised. - - + + llForceMouselook(integer mouselook) If mouselook is TRUE, any avatar that sits upon the prim will be forced into mouselook mode - - + + float llGetObjectMass(key id) Returns the mass of the avatar or object in the region - - + + list llListReplaceList(list dest, list src, integer start, integer end) Returns a list that is dest with start through end removed and src inserted at start - - + + llLoadURL(key avatar, string message, string url) Shows a dialog to avatar offering to load the web page at url with a message. If user clicks yes, launches the page in their web browser. - - + + llParcelMediaCommandList(list command) Sends a list of commands, some with arguments, to a parcel to control the playback of movies and other media - - + + list llParcelMediaQuery(list query) Returns a list containing results of the sent query - - + + integer llModPow(integer a, integer b, integer c) Returns a raised to the b power, mod c. ( (a**b)%c ) b is capped at 0xFFFF (16 bits). - - + + integer llGetInventoryType(string name) Returns the type of the inventory item name - - + + llSetPayPrice(integer price, list quick_pay_buttons) Sets the default amount on the dialog that appears when someone chooses to pay this prim - - + + vector llGetCameraPos() Returns the current camera position for the agent the task has permissions for - - + + rotation llGetCameraRot() Returns the current camera orientation for the agent the task has permissions for - - + + llSetPrimURL(string url) Updates the URL for the web page shown on the sides of the object - - + + llRefreshPrimURL() Reloads the web page shown on the sides of the object - - + + string llEscapeURL(string url) Returns an escaped/encoded version of url, replacing spaces with %20 etc. - - + + string llUnescapeURL(string url) Returns an unescaped/ unencoded version of url, replacing %20 with spaces etc. - - + + llMapDestination(string simname, vector pos, vector look_at) Opens the World Map centered on the region simname with pos highlighted. (NOTE: look_at currently does nothing.) Only works for scripts attached to avatar, or during touch events. - - + + llAddToLandBanList(key avatar, float hours) Adds avatar to the land ban list for hours, or indefinitely if hours is 0 - - + + llRemoveFromLandPassList(key avatar) Removes avatar from the land pass list - - + + llRemoveFromLandBanList(key avatar) Removes avatar from the land ban list - - + + llSetCameraParams(list rules) Sets multiple camera parameters at once. List format is [ rule1, data1, rule2, data2 . . . rulen, datan ] - - + + llClearCameraParams() Resets all camera parameters to default values and turns off scripted camera control - - + + float llListStatistics(integer operation, list src) Performs statistical aggregate functions on list src using LIST_STAT_* operations - - + + integer llGetUnixTime() Returns the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock - - + + integer llGetParcelFlags(vector pos) Returns a mask of the parcel flags (PARCEL_FLAG_*) for the parcel that includes the point pos - - + + integer llGetRegionFlags() Returns the region flags (REGION_FLAG_*) for the region the object is in - - + + string llXorBase64StringsCorrect(string s1, string s2) Correctly performs an exclusive or on two Base64 strings and returns a Base64 string. s2 repeats if it is shorter than s1. - - + + llHTTPRequest(string url, list parameters, string body) Sends an HTTP request to the specified url with the body of the request and parameters - - + + llResetLandBanList() -Removes all residents from the land ban list - - +Removes all Residents from the land ban list + + llResetLandPassList() -Removes all residents from the land access/pass list - - +Removes all Residents from the land access/pass list + + integer llGetObjectPrimCount(key object_id) Returns the total number of prims for an object in the region - - + + list llGetParcelPrimOwners(vector pos) -Returns a list of all residents who own objects on the parcel at pos and with individual prim counts. +Returns a list of all Residents who own objects on the parcel at pos and with individual prim counts. Requires owner-like permissions for the parcel. - - + + integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) Returns the number of prims on the parcel at pos of the given category. Categories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP - - + + integer llGetParcelMaxPrims(vector pos, integer sim_wide) Returns the maximum number of prims allowed on the parcel at pos - - + + list llGetParcelDetails(vector pos, list params) Returns the parcel details specified in params for the parcel at pos. -Params is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA - - +Params is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA, _ID, _SEE_AVATARS + + llSetLinkPrimitiveParams(integer linknumber, list rules) Sets primitive parameters for linknumber based on rules - - + + llSetLinkTexture(integer linknumber, string texture, integer face) Sets the texture of face for a task that exists in the link chain at linknumber - - + + string llStringTrim(string src, integer trim_type) Trims the leading and/or trailing white spaces from a string. trim_type can be STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL. - - + + llRegionSay(integer channel, string msg) Broadcasts msg on channel (not 0) that can be heard anywhere in the region by a script listening on channel - - + + list llGetObjectDetails(key id, list params) Returns the object details specified in params for the object with key id. Params are OBJECT_NAME, _DESC, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR - - + + llSetClickAction(integer action) Sets the action performed when a prim is clicked upon - - + + integer llGetRegionAgentCount() Returns the number of avatars in the region - - + + llTextBox(key avatar, string message, integer chat_channel Shows a dialog box on the avatar's screen with the message. It contains a text box for input, and if entered that text is chatted on chat_channel. - - + + string llGetAgentLanguage(key avatar) Returns the language code of the preferred interface language of the avatar - - + + vector llDetectedTouchUV(integer index) Returns the u and v coordinates in the first two components of a vector, for the texture coordinates where the prim was touched in a triggered touch event - - + + integer llDetectedTouchFace(integer index) Returns the index of the face where the avatar clicked in a triggered touch event - - + + vector llDetectedTouchPos(integer index) Returns the position where the object was touched in a triggered touch event - - + + vector llDetectedTouchNormal(integer index) Returns the surface normal for a triggered touch event - - + + vector llDetectedTouchBinormal(integer index) Returns the surface binormal for a triggered touch event - - + + vector llDetectedTouchST(integer index) Returns the s and t coordinates in the first two components of a vector, for the surface coordinates where the prim was touched in a triggered touch event - - + + string llSHA1String(string src) Returns a string of 40 hex characters that is the SHA1 security Hash of src - - + + integer llGetFreeURLs() Returns the number of available URLs for the current script - - + + key llRequestURL() Requests one HTTP:// url for use by this object. An http_request event is triggered with the results. - - + + key llRequestSecureURL() Requests one HTTPS:// (SSL) url for use by this object. An http_request event is triggered with the results. - - + + llReleaseURL(string url) Releases the specified URL, it will no longer be usable - - + + llHTTPResponse(key request_id, integer status, string body) Responds to request_id with status and body - - + + string llGetHTTPHeader(key request_id, string header) Returns the value for header for request_id - - + + integer llSetPrimMediaParams(integer face, list params) -Returns an integer that is a STATUS_* flag which details the success/failure of the operation(s). - - - list llGetPrimMediaParams(integer face, list params) +Sets the media params for a particular face on an object. If media is not already on this object, add it. +List is a set of name/value pairs in no particular order. Params not specified are unchanged, or if new media is added then set to the default specified. +The possible names are below, along with the types of values and what they mean. + + +list llGetPrimMediaParams(integer face, list params) Returns the media params for a particular face on an object, given the desired list of names, in the order requested. (Returns an empty list if no media exists on the face.) - - + + integer llClearPrimMedia(integer face) -Returns an integer that is a STATUS_* flag which details the success/failure of the operation. - - +Clears (deletes) the media and all params from the given face. + llSetLinkPrimitiveParamsFast(integer linknumber, list rules) Set primitive parameters for linknumber based on rules with no built-in script sleep. - - + + list llGetLinkPrimitiveParams(integer linknumber,list rules) Get primitive parameters for linknumber based on rules. - - + + list llLinkParticleSystem(integer linknumber, list rules) Creates a particle system based on rules. Empty list removes particle system from object. List format is [ rule1, data1, rule2, data2 . . . rulen, datan ]. - - + + llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate) Animate the texture on the specified face/faces of the specified prim/prims by setting the texture scale and offset. - - + + integer llGetLinkNumberOfSides(integer link) Returns the number of sides of the specified linked prim. - - + + string llGetUsername(key id) Returns the single-word username of an avatar, if the avatar is in the current region, otherwise the empty string. - - + + key llRequestUsername(key id) Requests single-word username of an avatar. When data is available the dataserver event will be raised. - - + + string llGetDisplayName(key id) Returns the name of an avatar, if the avatar is in the current simulator, and the name has been cached, otherwise the same as llGetUsername. Use llRequestDisplayName if you absolutely must have the display name. - - + + key llRequestDisplayName(key id) Requests name of an avatar. When data is available the dataserver event will be raised. - - -llRegionSayTo(key target, integer channel, string msg) -Sends msg on channel (not DEBUG_CHANNEL) directly to prim or avatar target anywhere within the region - - + + string llGetEnv(string name) Returns a string with the requested data about the region - - - - -list llCastRay( Vector start, Vector end, list options ) + + +list llCastRay(vector start, vector end, list params) Returns a list consisting of the following three values for each hit: UUID, Link number, Hit position. - - -integer llGetSPMaxMemory( ) + + +llRegionSayTo(key target, integer channel, string msg) +Sends msg on channel (not DEBUG_CHANNEL) directly to prim or avatar target anywhere within the region + + +integer llGetSPMaxMemory() Returns the integer of the most bytes used while llScriptProfiler was last active. - - -integer llGetUsedMemory( ) + + +integer llGetUsedMemory() Returns the integer of the number of bytes of memory currently in use by the script. - - + + +llScriptProfiler(integer flags) +Enables or disables script profiling options. Currently only supports PROFILE_SCRIPT_MEMORY (mono only) and PROFILE_NONE. +MAY SIGNIFICANTLY REDUCE SCRIPT PERFORMANCE! + + +integer llSetMemoryLimit(integer mem) +Request ''limit'' bytes to be reserved for this script. + + +integer llGetMemoryLimit() + + +llSetLinkMedia(integer link, integer face, list params) +Set the media params for a particular face on linked prim. List is a set of name/value pairs (in no particular order). The possible names are below, along with the types of values and what they mean. If media is not already on this object, add it. Params not specified are unchanged, or if new media is added set to the default specified. + + +list llGetLinkMedia(integer link, integer face, list params) +Get the media params for a particular face on linked prim, given the desired list of names. Returns a list of values in the order requested. Returns an empty list if no media exists on the face. + + +integer llClearLinkMedia(integer link, integer face) +Clears (deletes) the media and all params from the given face on linked prim(s). + + +llSetContentType(key request_id, integer content_type) +Set the Internet media type of an LSL HTTP server response. + + +llLinkSitTarget(integer link, vector offset, rotation rot ); +Set the sit location for the linked prim(s). The sit location is relative to the prim's position and rotation. + + +key llAvatarOnLinkSitTarget(integer link) +If an avatar is sitting on the sit target, return the avatar's key, NULL_KEY otherwise + + +llSetLinkCamera(integer link, vector eye, vector at) +Sets the camera eye offset, and the offset that the camera is looking at, for avatars that sit on the linked prim. + + +llSetVelocity(vector velocity, integer local) +Sets an objects velocity, in local coords if local == TRUE (if the script is physical) + + +llSetAngularVelocity(vector angular_velocity, integer local) +Sets an objects angular velocity, in local coords if local == TRUE (if the script is physical) + + +llSetPhysicsMaterial(integer flags, float gravity_multiplier, float restitution, float friction, float density ) +Sets the requested attributes of the root object's physics material. + + +llGetPhysicsMaterial() returns the gravity multiplier, restitution, friction, and density of the linkset as a list in that order. + + +llGetMassMKS() returns the mass of the linkset in kilograms. + + +llGenerateKey() +Retun a unique generated key + + +llSetKeyframedMotion(list keyframes, list options) +Requests that a nonphysical object be keyframed according to keyframe list. + + +key llTransferLindenDollars(key destination, integer amount) +Transfer amount of linden dollars (L$) from script owner to destination. Returns a key to a corresponding transaction_result event for the success of the transfer. + + +string llGetParcelMusicURL() +Gets the streaming audio URL for the parcel of land on which the object is located. + + +integer llSetRegionPos(vector pos) +Sets the position anywhere within the region (if the object isn't physical) + + +llNavigateTo(vector point, list options) +For AI Character: Navigate to destination. + + +llCreateCharacter(list options) +Convert linkset to AI Character which can navigate the world. + + http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer + None + Affects navmesh + Character + (Multiple) + + + +llPursue(key target, list options) +For AI Character: Chase after a target. + + +llWanderWithin(vector center, vector dist, list options) +For AI Character: Wander within a specified volume. + + +llFleeFrom(vector source, float radius, list options) +For AI Character: Flee from a point. + + +llPatrolPoints(list points, list options) +For AI Character: Patrol a list of points. + + +llExecCharacterCmd(integer cmd, list options) +For AI Character: Execute a character command. + + +llDeleteCharacter() +Convert linkset from AI Character to Physics object. + + +llUpdateCharacter(list options) +Change the AI Character's settings. + + +llEvade(key target, list options) +For AI Character: Evade a specified target. + + +list llGetClosestNavPoint(vector point, list options) +For AI Character: Get the closest navigable point to the point provided. + + +list llGetStaticPath(vector start, vector end, float radius, list params) +Returns a list of position vectors indicating pathfinding waypoints between positions at start and end, for a character of a given radius. The waypoints this function returns are for the 'static' nav mesh, meaning that dynamic objects are ignored. + + + +integer llManageEstateAccess(integer action, key id) +To add or remove agents from the estate's agent access or ban lists or groups from the estate's group access list. +Only works for objects owned by the Estate Owner or an Estate Manager. +Returns TRUE if successful and FALSE if throttled, on invalid action, on invalid or null id, or if object owner is not allowed to manage the estate. +'action' can be any of: ESTATE_ACCESS_ALLOWED_[AGENT/GROUP]_[ADD/REMOVE] or ESTATE_ACCESS_BANNED_AGENT_[ADD/REMOVE] + + +list llGetAgentList(integer scope, list options) +Requests a list of agents currently in the region, limited by the scope parameter. + + +llAttachToAvatarTemp(integer attach_point) +Attaches the object to the avatar who has granted permission to the script, with the exception that the object will not create new inventory for the user, and will disappear on detach or disconnect. + + +llTeleportAgent(key avatar, string landmark, vector position, vector look_at) +Requests a teleport of avatar to a landmark stored in the object's inventory. If no landmark is provided (an empty string), the avatar is teleported to the location position in the current region. In either case, the avatar is turned to face the position given by look_at in local coordinates. + + +llTeleportAgentGlobalCoords(key agent, vector global_coordinates, vector region_coordinates, vector look_at) +Teleports an agent to set of a region_coordinates within a region at the specified global_coordinates. The agent lands facing the position defined by look_at local coordinates. +A region's global coordinates can be retrieved using llRequestSimulatorData(region_name, DATA_SIM_POS) + + + llGodLikeRezObject( key inventory, vector pos ) Rez directly off of UUID if owner has god-bit set. (Requires god mode) - - -llScriptProfiler( integer flags ) -Enables or disables the scripts profiling state. - - + + llSetInventoryPermMask( string item, integer mask, integer value ) Sets the given permission mask to the new value on the inventory item. (Requires god mode) - - + + llSetObjectPermMask( integer mask, integer value ) Sets the given permission mask to the new value on the root object the task is attached to. (Requires god mode) - - -integer llSetMemoryLimit( integer limit ) -Request ''limit'' bytes to be reserved for this script. - - -integer llSetLinkMedia( integer link, integer face, list params ) -Set the media params for a particular face on the linked prim(s) without a delay. - - -list llGetLinkMedia( integer link, integer face, list params ) -Returns a list with the media params for a particular face on a linked prim, given the desired list of named params. - - -integer llClearLinkMedia( integer link, integer face ) -Clears the media and all params from the given face on the linked prim(s). - - -llSetLinkCamera( integer link, vector eye, vector at ) -Sets the camera eye offset, and the offset that the camera is looking at, for avatars that sit on the linked prim. - - -llSetContentType( key request_id, integer content_type ) -Set the Internet media type of an LSL HTTP server response. - - -llLinkSitTarget( integer link, vector offset, rotation rot ); -Set the sit location for the linked prim(s). The sit location is relative to the prim's position and rotation. - - -key llAvatarOnLinkSitTarget( integer link ) -Returns a key that is the UUID of the user seated on the prim. - + - - + + +osSetDynamicTextureURL(key dynamicID, string contentType, string url, string extraParams, integer timer ) +Renders a web texture on the prim containing the script, and returns the UUID of the newly created texture. + + +osSetDynamicTextureURLBlend(key dynamicID, string contentType, string url, string extraParams, integer timer, integer alpha) +Allows for two dynamic textures to blend on the prim containing this script. + + +osSetDynamicTextureURLBlendFace(key dynamicID, string contentType, string url, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face) +Loads a web texture on a prim. + + +osSetDynamicTextureData(key dynamicID, string contentType, string data, string extraParams, integer timer) +Writes text and vector graphics onto a prim face. + + +osSetDynamicTextureDataBlend(key dynamicID, string contentType, string data, string extraParams, integer timer, integer alpha) +Allows for two dynamic textures to blend on the prim containing this script. + + +osSetDynamicTextureDataBlendFace(key dynamicID, string contentType, string data, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face) +Allows for two dynamic textures to blend on the specified face of the prim containing this script. + + +osGetTerrainHeight(integer x, integer y) +Returns current terrain height as float at the given coordinates. + + +osSetTerrainHeight(integer x, integer y, float val) +Sets terrain height at the given coordinates. Use osTerrainFlush() afterwards. + + +osTerrainFlush() +Updates terrain data. Call this after you are done using osTerrainSetHeight. + + +osRegionRestart(float seconds) +Restart the current region in the specified number of seconds from now. + + +osRegionNotice(string msg) +Broadcasts a notification message to all agents on the current region. + + +osConsoleCommand(string command) +Issues commands directly to the OpenSim server console. + + +osSetParcelMediaURL(string url) +Sets parcel media URL. + + +osSetPrimFloatOnWater(integer floatYN) +Make physical prims float at the water level, TRUE or FALSE. + + +osSetParcelSIPAddress(string SIPAddress) +Sets parcel SIP Address for Voice. + + +osGetAgentIP(key agent) +Returns the Avatars IP Address as a string. Allows in-world tools be used to coordinate out of world network services that need access to client IP addresses. +Should *ONLY* be used by Region Server Owner. + + +osGetAgents() +Returns a list of all avatars in the region in which the script is running. + + + POLYMORPHIC COMMAND +osTeleportAgent(key agent, integer regionX, integer regionY, vector position, vector lookat) +osTeleportAgent(key agent, string regionName, vector position, vector lookat) +osTeleportAgent(key agent, vector position, vector lookat) + +Teleports the specified agent to a specified location in the region, the grid, or the hypergrid. + + + POLYMORPHIC COMMAND +osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat) +osTeleportOwner(string regionName, vector position, vector lookat) +osTeleportOwner(vector position, vector lookat) + +Teleports the owner of the object that holds the script to a specified location in the region, the grid, or the hypergrid. + + +osAvatarPlayAnimation(key UUID, string animation) +Triggers animations contained within the same prim as the script. Does not need the target avatar's permission. + + +osAvatarStopAnimation(key UUID, string animation) +Stops specified animation on the specified avatar. + + +osMovePen(string drawList, integer x, integer y) +Moves the pen's location to the coordinates specified by the x and y parameters, without drawing anything. + + + POLYMORPHIC COMMAND +osDrawLine(string drawList, integer startX, integer startY, integer endX, integer endY) +osDrawLine(string drawList, integer endX, integer endY) +Draws a line on a dynamic texture. + + +osDrawText(string drawList, string text) +Renders text on a dynamic texture. + + +osDrawEllipse(string drawList, integer width, integer height) +Draws an ellipse on a dynamic texture. + + +osDrawRectangle(string drawList, integer width, integer height) +Draws a rectangle on a dynamic texture. + + +osDrawFilledRectangle(string drawList, integer width, integer height) +Draws a rectangle on a dynamic texture, and fills it with the current pen color. + + +osDrawPolygon (string drawList, list x, list y) +Draws a polygon on a dynamic texture. + + +osDrawFilledPolygon (string drawList, list x, list y) +Draws a polygon on a dynamic texture, and fills it with the current pen color. + + +osSetFontName(string drawList, string fontName) +Sets current font to be used by osDrawText. Font must exist on region server to display. + + +osSetFontSize(string drawList, integer fontSize) +Sets the font size to be used in osDrawText. + + +osSetPenSize(string drawList, integer penSize) +Sets the pen size (line thickness) that is to be used when drawing dynamic textures. + + +osSetPenColor(string drawList, string color) +Sets the pen color that is to be used when drawing dynamic textures. + + +osSetPenCap(string drawList, string direction, string type) +Apply a shape on the end of a line. This allows using arrow, diamond, round and flat caps. + + +osDrawImage(string drawList, integer width, integer height, string imageUrl) +Retrieves an image specified by the imageUrl parameter and draws it at the specified height and width. + + +vector osGetDrawStringSize(string contentType, string text, string fontName, integer fontSize) +Returns a vector containing the horizontal and vertical dimensions in pixels of the specified text. + + +osSetStateEvents(integer events) +Used in the past as a workaround for a bug with Opensim, which has long since been fixed. + + +double osList2Double(list src, integer index) +Returns double-precision value from src at index. + + +osSetRegionWaterHeight(float height) +Adjusts water height on region. + + +osSetRegionSunSettings(integer useEstateSun, integer sunFixed, float sunHour) +Changes the estate sun settings, then triggers a sun update +'sunFixed' TRUE to keep the sun stationary, FALSE to use global time +'sunHour' The sun hour that is desired, 0...24, 0 is sunrise. + + +osSetEstateSunSettings(integer sunFixed, float sunHour) +sunFixed = TRUE or FALSE, sunHour = 00.00 to 24.00. + + +float osGetCurrentSunHour() +Returns float value of current sun hour 0...24 0 is sunrise. + + +float osGetSunParam(string param) +Returns current float values for param, where param = day_length, year_length, day_night_offset, update_interval. + + +osSetSunParam(string param, float value) +Sets region's sun parameters, where param = day_length, year_length, day_night_offset, update_interval. + + +string osWindActiveModelPluginName() +Returns the current working wind module installed +These are SimpleRandomWind or ConfigurableWind. + + +osSetWindParam(string plugin, string param, float value) +Sets value of param for plugin. SimpleRandomWind plugin param = strength. +ConfigurableWind plugin params = avgStrength, avgDirection, varStrength, varDirection, rateChange. + + +float osGetWindParam(string plugin, string param) +Returns float value of param for plugin. SimpleRandomWind plugin param = strength. +ConfigurableWind plugin params = avgStrength, avgDirection, varStrength, varDirection, rateChange. + + +osParcelJoin(vector start, vector end) +Where start = top corner, end = bottom corner. +Subdivides from start vector to end vector. Z is ignored but must exist in syntax + + +osParcelSubdivide(vector start, vector end) +Where start = top corner, end = bottom corner. +Subdivides from start vector to end vector. Z is ignored but must exist in syntax + + +osSetParcelDetails(vector pos, list rules) +Set parcel details at position x,y,x. +Rules = PARCEL_DETAILS_NAME, PARCEL_DETAILS_DESC, PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP + + +string osGetScriptEngineName() +Returns the name of the script engine which is currently enabled on the server. + + +string osGetSimulatorVersion() +Returns current server version information as a string. + + +string osParseJSON(string JSON) +Returns a deserialized JSON. + + +string osParseJSON(string JSON) +Returns a deserialized JSON object. + + +osMessageObject(key UUID, string message) +Sends string to object identified by UUID. +Receiving object requires a dataserver(key queryid, string data) in a contained script(s). +The queryid passed will be the id of the calling object. + + +osMakeNotecard(string notecardName, list contents) +Write a Notecard contained in Prim with contents of list. + + +string osGetNotecardLine(string name, integer line) +Reads the requested notecard line and return its data as a string. + + +string osGetNotecard(string name) +Reads the entire notecard and return its data as a string. + + +integer osGetNumberOfNotecardLines(string name) +Returns total number of lines in a notecard. + + +key osAvatarName2Key(string firstname, string lastname) +Returns the avatar's UUID from their firstname, lastname. + + +string osKey2Name(key UUID) +Returns avatar name from their UUID key. + + +string osGetGridNick() +Returns the grid's nickname. + + +string osGetGridName() +Returns the grid's name. + + +string osGetGridLoginURI() +Returns the grid's LoginURI. + + +string osGetGridHomeURI() +Returns the current grid URI. + + +string osGetGridCustom(string key) +Returns the grid's Grid Info. + + +string osFormatString(string to_format, list strings) +Returns string. OsFormatString("My name is {0}, I'm located in {1}”, [llGetObjectName(), llGetRegionName()]) +Where {num} parameters must be incremented for each list item, starting at zero, surrounded by curly brackets. + + +list osMatchString(string src, string pattern, integer start) +Returns list of matches for the pattern and its components inside the source string. The pattern is a regular expression. +Each match in the result is the string that matched and its position in the source. + + +string osReplaceString(string src, string pattern, string replace, integer count, integer start) +Returns new string with replacements completed. + + +string osLoadedCreationDate() +Returns Creation Date from meta data of OAR. + + +string osLoadedCreationTime() +Returns Creation Time from meta data of OAR. + + +string osLoadedCreationID() +Returns creation ID from meta data of OAR. Can not be used to identify a machine. + + +list osGetLinkPrimitiveParams(integer linknumber, list rules) +Returns prim params for the linkset prims specified by linknum. +If using linkset constants (e.g. LINK_SET, LINK_ALL_CHILDREN, etc), the requested params of each relevant prim are concatenated to the end of the list. +Otherwise, usage is identical to llGetPrimitiveParams(). + + +key osIsNpc(key NPC) +Returns TRUE if 'key' is an NPC (non-player-character). + + + POLYMORPHIC +osNpcCreate(string firstname, string lastname, vector position, string notecard) +osNpcCreate(string firstname, string lastname, vector position, string notecard, integer options) +Creates an NPC (Non Player Character) clone named firstname lastname at position from a notecard containing the specifications. + + +osNpcSaveAppearance(key npc, string notecard) +Save NPC's current body part, clothing and attachments data to notecard in prim inventory. +The avatar must be present in the region when this function is invoked. +The baked textures for the avatar (necessary to recreate appearance) are saved permanently.) + + +osNpcLoadAppearance(key npc, string notecard) +Load NPC appearance from notecard. +This notecard must contain appearance data created with the save appearance function. + + +vector osNpcGetPos(key npc) +Returns current position vector of the NPC. + + +osNpcMoveTo(key npc, vector position) +Moves an NPC to a location within the region. + + +osNpcMoveToTarget(key npc, vector target, integer options) +Moves NPC to given target over time. +Options = OS_NPC_FLY, OS_NPC_NO_FLY, OS_NPC_LAND_AT_TARGET, OS_NPC_RUNNING + + +rotation osNpcGetOwner(key npc) +Returns the NPC owner UUID. + + +rotation osNpcGetRot(key npc) +Gets the rotation of the avatar. Only the rotation around the Z plane in Euler rotation (horizontal rotation) has any meaning. + + +osNpcSetRot(key npc, rotation rot) +Set the rotation of the NPC. Only setting the rotation in the Z plane in Euler rotation will have any meaningful effect (turning NPC facing direction). +Setting X or Y Euler values will result in the avatar rotating in an undefined manner. + + +osNpcStopMoveToTarget(key npc) +Stop a current move to a target. + + +osNpcSay(key npc, string message) +Makes an NPC say something. + + +osNpcSit(key npc, key primkey, integer options) +Makes NPC sit on prim/item. + + +osNpcStand(key npc) +Makes NPC identified by UUID to stand. + + +osNpcRemove(key npc) +Removes an NPC. + + +osNpcPlayAnimation(key npc, string animation) +Makes NPC identified by key npc to play animation. + + +osNpcStopAnimation(key npc, string animation) +Makes NPC identified by key npc stop playing animation. + + +osOwnerSaveAppearance(string notecard) +Save Owner's current body part, clothing and attachments data to notecard in prim inventory. +The avatar must be present in the region when this function is invoked. +The baked textures for the avatar (necessary to recreate appearance) are saved permanently.) + + +osAgentSaveAppearance(key agentId, string notecard) +Save an Avatar's current body part, clothing and attachments data to specified notecard in prim inventory. +The avatar must be present in the region when this function is invoked. +The baked textures for the avatar (necessary to recreate appearance) are saved permanently.) + + +key osGetMapTexture() +Returns the map texture UUID of current region. + + +key osGetRegionMapTexture(string regionName) +Returns the map texture UUID for the regionName requested. + + +list osGetRegionStats() +Returns a list of float values representing a number of region statistics (21 of the values shown in the statistics bar of LL-based clients). + + +integer osGetSimulatorMemory() +Returns integer of current memory used by simulator instance. + + +osKickAvatar(string FirstName, string LastName, string alert) +Kicks avatar from region with an alert message. + + +osSetSpeed(key UUID, float SpeedModifier) +Multiplies the normal running, walking, and flying speed of the specified avatar. + + +osCauseHealing(key UUID, float healing) +Causes healing to specified avatar. + + +osCauseDamage(key UUID, float damage) +Causes damage to specified avatar. Region must be damage enabled. + + +list osGetPrimitiveParams(key prim, list rules) +Gets the parameters of the primitive, specified by key. + + +osSetPrimitiveParams(key prim, list rules) +Sets primitive Params. + + + POLYMORPHIC COMMAND +osSetProjectionParams(key prim. integer projection, key texture, float fov, float focus, float ambience) +osSetProjectionParams(integer projection, key texture, float fov, float focus, float ambience) +osSetProjectionParams(key prim, integer projection, key texture, float fov, float focus, float ambience) + + +list osGetAvatarList() +Returns strided list of the UUID, position, and name of each avatar in the region, except the owner. + + +string osUnixTimeToTimestamp(integer unixtime) +Converts unixtime to an llGetTimeStamp() formated string. + + +string osGetGridGatekeeperURI() +returns the value of Gatekeeper in [GridService] section for both standalone and grids. + + +string osGetInventoryDesc(string itemName) +returns the description of an inventory item contained within a prim. + + +Attach the object containing this script to the avatar that owns it without checking for PERMISSION_ATTACH +For example, osForceAttachToAvatar(ATTACH_CHEST) + + +Detach the object containing this script from the avatar it is attached to without checking for PERMISSION_ATTACH +Nothing happens if the object is not attached + + +osNpcSay(key npc, integer channel, string message) + + +osNpcShout(key npc, integer channel, string message) + + +osNpcWhisper(key npc, integer channel, string message) + + +osSetTerrainTexture(integer level, key texture) +sets terrain texture to level specified using the specific UUID of the texture + + +osSetTerrainTextureHeight(int corner, float low, float high) +sets terrain texture in corner specified between the low and high levels. Identical to setting textures in Region Manager within the viewer. + + +integer osInviteToGroup(key agentId) +Returns True / False if user identified by agentID is successfully added to group. (Object containing script must be attached to a group) + + +integer osEjectFromGroup(key agentId) +Returns True / False if user identified by agentID is successfully removed from group. (Object containing script must be attached to a group) + + +cmSetWindlightScene(list rules) +Set the current WindLight scene. Estate managers and owners only. +(Reguires LightShare Enabled Viewer) + + +cmSetWindlightSceneTargeted(list rules, key target) +Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. +(Reguires LightShare Enabled Viewer) + + +list cmGetWindlightScene(list rules) +Get the current LightShare settings. +(Reguires LightShare Enabled Viewer) + + +lsSetWindlightScene(list rules) +Set the current WindLight scene. Estate managers and owners only. +(Reguires LightShare Enabled Viewer) + + +lsSetWindlightSceneTargeted(list rules, key target) +Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. +(Reguires LightShare Enabled Viewer) + + +list lsGetWindlightScene(list rules) +Get the current WindLight settings. +(Reguires LightShare Enabled Viewer) + + + +osReturnObject(key userID) +Returns object to specified avatars UUID. +(Aurora-Sim only) + + +osReturnObjects(float Parameter) +Returns group of objects. Parameter's are numeric, values are owner objects = 0, everyone except owner objects = 1, group objects = 2. +(Aurora-Sim only) + + +osShutDown() +Shut's down current Simulator. Authorized Admin Only by config. +(Aurora-Sim only) + + +osAddAgentToGroup(key avatarID, string group_name, string role_name) +Adds an avatar to a group. Where group_name = name of the target group, role_name = role to assign within the group. +(Aurora-Sim only) + + +osRezObject(string inventory, vector position, vector velocity, rotation rot, integer param, integer isRezAtRoot, integer doRecoil, integer SetDieAtEdge, integer CheckPos) +Where inventory = object to rez. Position = vector to rez object. Velocity = initial velocity. Rot = initial rotation. Param = onrez event. +IzAtRoot = TRUE/FALSE flag changes llRezAtRoot to llRezObject. doRecoil =TRUE/FALSE to push avatar. SetDieAtEdge = TRUE/FALSE for rezzed object to die at edge of region. +CheckPos = TRUE/FALSE enable/disable 10m rez limit. +(Aurora-Sim only) + + +aaSetCloudDensity(float density) +AaSetCloudDensity(0.5) Where float density values are 0.0 = no cloud to 1.0 = 100% cloud. +(Aurora-Sim only) + + +aUpdateDatabase(string Key, string value, string token) +Where Key = database field name, xmlDataToPutIntoTheDatabase = serialized XML data, Token = data-password +(Aurora-Sim only) + + +aaQueryDatabase(string Key, string Token) +Returns a list with first value is the token, the second the Key, and the third the value +Where Key = database field name, Token = data-password +(Aurora-Sim only) + + +aaDeserializeXMLValues(string xmlData) +Returns a list of Values from XML data. Where xmlData = xml formatted data Values. +(Aurora-Sim only) + + +aaDeserializeXMLKeys(string xmlData) +Returns a list of keys from XML data. Where xmlData = xml formatted data keys. +(Aurora-Sim only) + + +aaSetConeOfSilence(float radius) +Where radius = metres radius from centre of scripted item. This creates an area that sounds can only be heard by the people within the area(radius) and not heard outside and visa-versa. +(Aurora-Sim only) + + +aaSerializeXML(list keys, list values) +Returns xml formatted string of the keys and values. Where keys = list of keys in the database, values = fields to retrieve from database. +(Aurora-Sim only) + + +aaGetTeam(key uuid) +Returns a string of avatars team name. Where uuid = avatar key. +(Aurora-Sim only) + + +aaGetHealth(key uuid) +Returns float value (0.0 to 100.0) of current health. Where uuid = avatar key. +(Aurora-Sim only) + + +aaJoinCombat(key uuid) +Where uuid = avatar key. If (PERMISSION_COMBAT == PERMISSION_COMBAT) and permission is granted then join combat. +(Aurora-Sim only) + + +aaLeaveCombat(key uuid) +Where uuid = avatar key. +(Aurora-Sim only) + + +aaJoinCombatTeam(key uuid, string team) +Where uuid = key of avatar, team = string of the team name. +(Aurora-Sim only) + + +aaRequestCombatPermission(key ID) +Where ID = avatar uuid. Requests target avatar for Permissions to enter into combat mode. +Raises a run_time_permissions event. (PERMISSION_COMBAT == PERMISSION_COMBAT). +(Aurora-Sim only) + + +aaThawAvatar(key ID) +Where ID = avatar uuid. If combat permission are granted then avatar can be un-frozen (movement re-enabled). +(Aurora-Sim only) + + +aaFreezeAvatar(key ID) +Where ID = avatar uuid. If combat permission are granted then avatar can be frozen (no movement). +(Aurora-Sim only) + + +aaGetTeamMembers(string team) +Return a list of team members. Where team = string of team name. +(Aurora-Sim only) + + + POLYMORPHIC FUNCTION. +aaGetLastOwner(string PrimID) returns last owner UUID of PrimID where PrimID = uuid of prim. +AaGetLastOwner() returns last owner uuid of prim containg script. +(Aurora-Sim only) + + +aaSayDistance(integer channelID, float Distance, string text) +Where channelID = channel to say on, Distance = float in meters for distance to say, text = string to say. +(Aurora-Sim only) + + +aaSayTo(key userID, string text) +Where userID = avatar key, text = string msg. Similar to llOwnerSay but can be directly targeted to an avatar. +(Aurora-Sim only) + + +aaGetWalkDisabled(key ID) +Returns integer of TRUE or FALSE for specifid ID. Where ID = avatar uuid. +(Aurora-Sim only) + + +aaSetWalkDisabled(key ID, integer Value) +Where ID = avatar uuid, Value = TRUE or FALSE. If PERMISSION_COMBAT is accepted, this disables walk, forcing avatar to fly. +(Aurora-Sim only) + + +aaGetFlyDisabled(key ID) +Returns integer of TRUE or FALSE for specifid ID. Where ID = avatar uuid. +(Aurora-Sim only) + + +aaSetFlyDisabled(key ID, integer Value) +Where ID = avatar uuid, Value = TRUE or FALSE. If PERMISSION_COMBAT is accepted, this disables flying, forcing avatar to walk. +(Aurora-Sim only) + + +aaAvatarFullName2Key(string FullName) +Returns the avatar uuid from their fullname. Where FullName = "Firstname Lastname”. +(Aurora-Sim only) + + +aaRaiseError(string message) +Allows you to have errors that end the execution of the event and fire another event in the script. +(Aurora-Sim only) + + +aaGetText() +Returns a string of the hover text of an object. +(Aurora-Sim only) + + +aaGetTextColor() +Returns the hovertext color in rotation. Use Ex: rotation color = aaGetTextColor() to separate color.x, color.y, color.z, color.s Where s = value of alpha in llSetText. +(Aurora-Sim only) + + +aaSetEnv(string EnvName, list Value) +Sets environment values. Where EnvName = ENABLE_GRAVITY, GRAVITY_FORCE_X, GRAVITY_FORCE_Y, GRAVITY_FORCE_Z, ADD_GRAVITY_POINT, ADD_GRAVITY_FORCE, START_TIME_REVERSAL_SAVING, +STOP_TIME_REVERSAL_SAVING, START_TIME_REVERSAL, STOP_TIME_REVERSAL. +(Aurora-Sim only) + + +aaGetIsInfiniteRegion() +Returns TRUE or FALSE if region is an infinite region. +(Aurora-Sim only) + + +botGetWaitingTime(integer waitTime) +Returns waitTime as vector. +(Aurora-Sim only) + + +botSetMap(key keyOfBot, list positions, list movementType, integer flags) +keyOfBot = bot uuid, positions = list of position vectors, movementType = corresponding list of move modes: 0 – walk, 1 – fly, +flags = BOT_FOLLOW_FLAG_NONE and BOT_FOLLOW_FLAG_INDEFINITELY. +(Aurora-Sim only) + + +botCreateBot(string FirstName, string LastName, key idToClone, vector startPos) +Where FirstName and LastName = strings for new bot name. idToClone = uuid of prebuild avatar to clone OR another existing avatar. startPos = vector of starting position on region. +(Aurora-Sim only) + + +botRemoveBot(key botID) +Where botID = uuid of bot. Removes bot identified by botID. +(Aurora-Sim only) + + +botPauseMovement(key botID) +Where botID = bot uuid. Pauses bot at current position. +(Aurora-Sim only) + + +botResumeMovement(key botID) +Where botID = bot uuid. Resumes bot movement. +(Aurora-Sim only) + + +botFollowAvatar(key botID, string avName, float startFollowDistance, float endFollowDistance) +Where botID = bot uuid. AvName = sting of avatar name OR avatar uuid. StartFollowDistance = distance to start following from. EndFollowDistance = distance to stop following avatar. +(Aurora-Sim only) + + +botStopFollowAvatar(key botID) +Where botID = bot uuid. Stops bot from following an avatar. +(Aurora-Sim only) + + +botSendChatMessage(key botID, string message, integer channel, integer sayType) +Where botID = bot uuid. Message = string msg. Channel = channel to speak on. SayType = (0=whisper, 1=say, 2=shout). +(Aurora-Sim only) + + +botSendIM(string bot, string user, string message) +Send IM to bot. +(Aurora-Sim only) + + +botSetShouldFly(key botID, integer ShouldFly) +Where botID = bot uuid. ShouldFly = TRUE/FALSE. Enables or disables flight mode. +(Aurora-Sim only) + + +botSitObject(key botID, key objectID, vector offset) +Where botID = bot uuid, objectID = uuid of object to sit on, offset = Vector for sit position (note that VECTOR_ZERO = default sit pos). +(Aurora-Sim only) + + +botStandUp(key botID) +Where botID = bot uuid. Command bot to stand up. +(Aurora-Sim only) + + +botTouchObject(key botID, key objectID) +Where botID = bot uuid, objectID = object uuid. Causes bot to touch object identified. +(Aurora-Sim only) + + +botAddTag(key botID, string tag) +Where botID = bot uuid, tag = string tag over bot. +(Aurora-Sim only) + + +botGetBotsWithTag(string tag) +Where tag = tag string to match. Return a list of bot UUID's in region with the matching tag. +(Aurora-Sim only) + + +botRemoveBotsWithTag(string tag) +Where tag = tag string to match. Removes bot's matching the tag. +(Aurora-Sim only) + + + Not Away Away @@ -1845,7 +2764,7 @@ Returns a key that is the UUID of the user seated on the prim. - + Loading contents... @@ -1854,9 +2773,9 @@ Returns a key that is the UUID of the user seated on the prim. - - - + + + @@ -1966,714 +2885,4 @@ Try enclosing path to the editor with double quotes. Error parsing the external editor command. External editor failed to run. - - http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer - None - Affects navmesh - Character - (Multiple) - - - -osSetRegionWaterHeight(float height) -Adjusts water height on region. -(OpenSim only.) - - -osSetRegionSunSettings(integer useEstateSun, integer sunFixed, float sunHour) -Changes the estate sun settings, then triggers a sun update -'sunFixed' TRUE to keep the sun stationary, FALSE to use global time -'sunHour' The sun hour that is desired, 0...24, 0 is sunrise. -(OpenSim only.) - - -osSetEstateSunSettings(integer sunFixed, float sunHour) -sunFixed = TRUE or FALSE, sunHour = 00.00 to 24.00. -(OpenSim only.) - - -float osGetCurrentSunHour() -Returns float value of current sun hour 0...24 0 is sunrise. -(OpenSim only.) - - -*DEPRECATED* Use osGetSunParam instead. -(OpenSim only.) - - -*DEPRECATED* Use osSetSunParam instead. -(OpenSim only.) - - -string osWindActiveModelPluginName() -Returns the current working wind module installed -These are SimpleRandomWind or ConfigurableWind. -(OpenSim only.) - - -osParcelJoin(vector pos1, vector pos2)) -Joins parcels @ X,Y coordinates. -(OpenSim only.) - - -osParcelSubdivide(vector pos1, vector pos2)) -Subdivides parcels @ X,Y coordinates. -(OpenSim only.) - - -*DEPRECATED* Use osSetParcelDetails instead. -(OpenSim only.) - - -*DEPRECATED* Use osSetWindParam instead. -(OpenSim only.) - - -*DEPRECATED* Use osGetWindParam instead. -(OpenSim only.) - - -double osList2Double(list src, integer index) -Returns double-precision value from src at index. -(OpenSim only.) - - -osSetDynamicTextureURL(key dynamicID, string contentType, string url, string extraParams, integer timer ) -Renders a web texture on the prim containing the script, and returns the UUID of the newly created texture. -(OpenSim only.) - - -osSetDynamicTextureData(key dynamicID, string contentType, string data, string extraParams, integer timer) -Writes text and vector graphics onto a prim face. -(OpenSim only.) - - -osSetDynamicTextureURLBlend(key dynamicID, string contentType, string url, string extraParams, integer timer, integer alpha) -Allows for two dynamic textures to blend on the prim containing this script. -(OpenSim only.) - - -osSetDynamicTextureDataBlend(key dynamicID, string contentType, string data, string extraParams, integer timer, integer alpha) -Allows for two dynamic textures to blend on the prim containing this script. -(OpenSim only.) - - -osSetDynamicTextureURLBlendFace(key dynamicID, string contentType, string url, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face) -Loads a web texture on a prim. -(OpenSim only.) - - -osSetDynamicTextureDataBlendFace(key dynamicID, string contentType, string data, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face) -(OpenSim only.) - - -*DEPRECATED* Use osGetTerrainHeight instead. -(OpenSim only.) - - -*DEPRECATED* Use osSetTerrainHeight instead. -(OpenSim only.) - - -osTerrainFlush() -Updates terrain data. Call this after you are done using osTerrainSetHeight. -(OpenSim only.) - - -integer osRegionRestart(float seconds) -Restart the current region in the specified number of seconds from now. -(OpenSim only.) - - -osRegionNotice(string msg) -Broadcasts a notification message to all agents on the current region. -(OpenSim only.) - - -osConsoleCommand(string command) -Issues commands directly to the OpenSim server console. -(OpenSim only.) - - -osSetParcelMediaURL(string url) -Sets parcel media URL. -(OpenSim only.) - - -osSetParcelSIPAddress(string SIPAddress) -Sets parcel SIP Address for Voice. -(OpenSim only.) - - -osSetPrimFloatOnWater(integer floatYN) -Make physical prims float at the water level, TRUE or FALSE. -(OpenSim only.) - - -osTeleportAgent(key agent, integer regionX, integer regionY, vector position, vector lookat) - or -osTeleportAgent(key agent, string regionName, vector position, vector lookat) - or -osTeleportAgent(key agent, vector position, vector lookat) -Teleports the specified agent to a specified location in the region, the grid, or the hypergrid. See documentation for details. -(OpenSim only.) - - -string osGetAgentIP(key agent) -Returns the Avatars IP Address -Allows in-world tools be used to coordinate out of world network services that need access to client IP addresses. -Should *ONLY* be used by Region Server Owner. -(OpenSim only.) - - -list osGetAgents() -Returns a list of all avatars in the region in which the script is running. -(OpenSim only.) - - -osAvatarPlayAnimation(key UUID, string animation) -Triggers animations contained within the same prim as the script. Does not need the target avatar's permission. -(OpenSim only.) - - -osAvatarStopAnimation(key UUID, string animation) -Stops specified animation on the specified avatar. -(OpenSim only.) - - -osMovePen(string drawList, integer x, integer y) -Moves the pen's location to the coordinates specified by the x and y parameters, without drawing anything. -(OpenSim only.) - - -osDrawLine(string drawList, integer startX, integer startY, integer endX, integer endY) -osDrawLine(string drawList, integer endX, integer endY) -Draws a line on a dynamic texture. -(OpenSim only.) - - -osDrawText(string drawList, string text) -Renders text on a dynamic texture. -(OpenSim only.) - - -osDrawEllipse(string drawList, integer width, integer height) -Draws an ellipse on a dynamic texture. -(OpenSim only.) - - -osDrawRectangle(string drawList, integer width, integer height) -Draws a rectangle on a dynamic texture. -(OpenSim only.) - - -osDrawFilledRectangle(string drawList, integer width, integer height) -Draws a rectangle on a dynamic texture, and fills it with the current pen color. -(OpenSim only.) - - -string osDrawPolygon (string drawList, list x, list y) -Draws a polygon on a dynamic texture. -(OpenSim only.) - - -string osDrawFilledPolygon (string drawList, list x, list y) -Draws a polygon on a dynamic texture, and fills it with the current pen color. -(OpenSim only.) - - -osSetFontSize(string drawList, integer fontSize) -Sets the font size to be used in osDrawText. -(OpenSim only.) - - -osSetFontName(string drawList, string fontName) -Sets current font to be used by osDrawText. -(OpenSim only.) - - -osSetPenSize(string drawList, integer penSize) -Sets the pen size (line thickness) that is to be used when drawing dynamic textures. -(OpenSim only.) - - -osSetPenCap(string drawList, string direction, string type) -Apply a shape on the end of a line. This allows using arrow, diamond, round and flat caps. -(OpenSim only.) - - -*DEPRECATED* Use osSetPenColor instead -(OpenSim only.) - - -osDrawImage(string drawList, integer width, integer height, string imageUrl) -Retrieves an image specified by the imageUrl parameter and draws it at the specified height and width. -(OpenSim only.) - - -vector osGetDrawStringSize(string contentType, string text, string fontName, integer fontSize) -Returns a vector containing the horizontal and vertical dimensions in pixels of the specified text -(OpenSim only.) - - -osSetStateEvents(integer events) -Used in the past as a workaround for a bug with Opensim, which has long since been fixed. -(OpenSim only.) - - -string osGetScriptEngineName() -Returns the name of the script engine which is currently enabled on the server. -(OpenSim only.) - - -string osGetSimulatorVersion() -Returns OpenSim server version information as a string. -(OpenSim only.) - - -string osParseJSON(string JSON) -Returns a hashtable containing the structured JSON contents. -(OpenSim only.) - - -osMessageObject(key UUID, string message) -Sends a string to the object identified by UUID. -The receiving object requires a dataserver(key queryid, string data) in a contained script(s). -The queryid passed will be the id of the calling object. -(OpenSim only.) - - -osMakeNotecard(string notecardName, list contents) -Write a Notecard contained in Prim with contents of list. -(OpenSim only.) - - -string osGetNotecardLine(string name, integer line) -Reads the requested notecard line and return its data as a string. -(OpenSim only.) - - -string osGetNotecard(string name) -Reads the entire notecard and return its data as a string. -(OpenSim only.) - - -integer osGetNumberOfNotecardLines(string name) -Returns total number of lines in a notecard. -(OpenSim only.) - - -key osAvatarName2Key(string firstname, string lastname) -Returns the avatar's UUID from their firstname, lastname. -(OpenSim only.) - - -string osKey2Name(key UUID) -Returns avatar name from their UUID key. -(OpenSim only.) - - -string osGetGridNick() -Returns the grid's nickname. -(OpenSim only.) - - -string osGetGridName() -Returns the grid's name. -(OpenSim only.) - - -string osGetGridLoginURI() -Returns the grid's LoginURI. -(OpenSim only.) - - -string osFormatString(string str, list strings) -Return the string with parameters substituted into it (format comes from .NET String.Format class) -Parameters are specified positionally. -(OpenSim only.) - - -list osMatchString(string src, string pattern, integer start) -Return a list of matches for the pattern and its components inside the source string. -The pattern is a regular expression. Each match in the result is the string that matched and its position in the source. -(OpenSim only.) - - -string osLoadedCreationDate() -Returns Creation Date from meta data of OAR. -(OpenSim only.) - - -string osLoadedCreationTime() -Returns Creation Time from meta data of OAR. -(OpenSim only.) - - -string osLoadedCreationID() -Returns creation ID from meta data of OAR. Can not be used to identify a machine. -(OpenSim only.) - - -list osGetLinkPrimitiveParams(integer linknumber, list rules) -Returns the primitive parameters for the linkset prims specified by linknumber. If using linkset constants (e.g. LINK_SET, LINK_ALL_CHILDREN, etc), the requested parameters of each relevant prim are concatenated to the end of the list. Otherwise, usage is identical to llGetPrimitiveParams(). -(OpenSim only.) - - -key osNpcCreate(string firstname, string lastname, vector position, key UUID) -Creates an NPC (Non Player Character) clone named firstname lastname at position from an already existing avatar specified by UUID. -(OpenSim only.) - - -osNpcMoveTo(key npc, vector position) -Moves an NPC to a location within the region. -(OpenSim only.) - - -osNpcSay(key npc, string message) -Makes an NPC say something. -(OpenSim only.) - - -osNpcRemove(key npc) -Removes an NPC. -(OpenSim only.) - - -key osGetMapTexture() -Returns the map texture UUID. -(OpenSim only.) - - -key osGetRegionMapTexture(string regionName) -Returns the map texture UUID for the regionName requested. -(OpenSim only.) - - -list osGetRegionStats() -Returns a list of float values representing a number of region statistics (21 of the values shown in the statistics bar of LL-based clients). -(OpenSim only.) - - -integer osGetSimulatorMemory() -Returns the current amount of RAM used by the current OpenSim instance. -(OpenSim only.) - - -osKickAvatar(string FirstName, string LastName, string alert) -Kicks avatar from region with an alert message. -(OpenSim only.) - - -osSetSpeed(key UUID, float SpeedModifier) -Multiplies the normal running, walking, and flying speed of the specified avatar. -(OpenSim only.) - - -osCauseDamage(key UUID, float damage) -Causes damage to specified avatar. -(OpenSim only.) - - -osCauseHealing(key UUID, float healing) -Causes healing to specified avatar. -(OpenSim only.) - - -list osGetPrimitiveParams(key prim, list rules) -Gets the parameters of the primitive, specified by key. -(OpenSim only.) - - -osSetPrimitiveParams(key prim, list rules) -Sets primitive Params. -(OpenSim only.) - - -osSetProjectionParams(key prim. integer projection, key texture, float fov, float focus, float amb) -Set projection paramaters for light sources. -(OpenSim only.) - - -string osUnixTimeToTimestamp(integer unixtime) -Converts unixtime to an llGetTimeStamp() formated string. -(OpenSim only.) - - -osSetPenColor(string drawList, string color) -Sets the pen color that is to be used when drawing dynamic textures. -(OpenSim only.) - - -float osGetSunParam(string param) -Returns current float values for param, where param = day_length, year_length, day_night_offset, update_interval. -(OpenSim only.) - - -osSetSunParam(string param, float value) -Sets region's sun parameters, where param = day_length, year_length, day_night_offset, update_interval. -(OpenSim only.) - - -osSetParcelDetails(vector pos, list rules) -Set parcel details. -(OpenSim only.) - - -float osGetTerrainHeight(integer x, integer y) -Returns current terrain height at the given coordinates. -(OpenSim only.) - - -osSetTerrainHeight(integer x, integer y, float val) -Sets terrain height at the given coordinates. Use osTerrainFlush() afterwards. -(OpenSim only.) - - -list osGetAvatarList() -Returns a strided list of the UUID, position, and name of each avatar in the region, except the owner. -(OpenSim only.) - - -osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat) - or -osTeleportOwner(string regionName, vector position, vector lookat) - or -osTeleportOwner(vector position, vector lookat) -Teleports the owner of the object that holds the script to a specified location in the region, the grid, or the hypergrid. See documentation for details. -(OpenSim only.) - - - - -integer cmSetWindlightScene(list rules) -Set the current WindLight scene. Estate managers and owners only. -(Reguires LightShare) - - -integer cmSetWindlightSceneTargeted(list rules, key target) -Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. -(Reguires LightShare) - - -list cmGetWindlightScene(list rules) -Get the current WindLight settings. -(Reguires LightShare) - - - - -integer lsSetWindlightScene(list rules) -Set the current WindLight scene. Estate managers and owners only. -(Reguires LightShare) - - -integer lsSetWindlightSceneTargeted(list rules, key target) -Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. -(Reguires LightShare) - - -list lsGetWindlightScene(list rules) -Get the current WindLight settings. -(Reguires LightShare) - - - - -key osNpcSaveAppearance(key npc, string notecardName) -Saves the NPC's appearance to a notecard. -(OpenSim only.) - - -osNpcLoadAppearance(key npc, string notecardName) -Loads the NPC's appearance from a notecard with appearance data. -Notecards can also be loaded by UUID. -(OpenSim only.) - - -osNpcMoveToTarget(key npc, vector position, integer options) -Moves the NPC to a target at a given vector, using options to walk or to fly there. -(OpenSim only.) - - -key osOwnerSaveAppearance(string notecardName) -Saves the owner's appearance to a notecard inside the prim that holds the script. -(OpenSim only.) - - -rotation osNpcGetRot(key npc) -Retrieves the rotation of an NPC -(OpenSim only.) - - -osNpcSetRot(key npc, rotation rot) -Sets an NPC's rotation. -(OpenSim only.) - - -key osOwnerSaveAppearance(key avatarId, string notecardName) -Saves an avatar's appearance to a notecard inside the prim that holds the script. -(OpenSim only.) - - -vector osNpcGetPos(key npc) -Retrieves the vector of an NPC's position within a region. -(OpenSim only.) - - -osNpcStopMoveToTarget(key npc) -Makes an NPC stop moving to a target. -(OpenSim only.) - - -float osGetWindParam(string plugin, string param) -Gets the value of param property for plugin module. -(OpenSim only.) - - -osSetWindParam(string plugin, string param, float value) -Sets value of param property for plugin module. -(OpenSim only.) - - (Unnamed) - -float llGetMassMKS() -Returns a float that is the mass (in -Kilograms) of the object that the -script is attached to. - - -integer llGetMemoryLimit() -Get the maximum memory a script can use. - - -string llGetParcelMusicURL() -Returns a string containing the parcel streaming audio URL. -The object owner must also be the land owner. - - -list llGetPhysicsMaterial() -Used to get the physical characteristics of an object. -Returns a list in the form [ float gravity_multiplier, float restitution, float friction, float density ] - - -integer llManageEstateAccess(integer action, key avatar) -Used to add or remove agents from the estate's agent access or ban lists or groups from the estate's group access list. - - -llSetAngularVelocity(vector force, integer local) -Applies rotational velocity to object. - - -llSetKeyframedMotion(list keyframes, list options) -Specify a list of times, positions, and orientations to be followed by an object. The object will be smoothly moved between keyframes by the simulator. - - -llSetPhysicsMaterial(integer material, float gravity, -float restitution, float friction, float density) -Used for setting the physical characteristics of an object. - - -integer llSetRegionPos(vector position) -Tries to move the entire object so that the root prim is within 0.1m of position - - -llSetVelocity(vector force, integer local) -Applies velocity to an object - - -key llTransferLindenDollars(key destination, integer amount) -Transfer amount of L$ money from script owner to destination avatar. - - - - -llCreateCharacter(list options) -Creates a pathfinding entity, known as a "character" from the object containing the script. - - -llDeleteCharacter() -Convert the current linkset back to a standard object, removing all pathfinding properties. - - -llEvade(key target, list options) -Characters will try to hide from their pursuers if there is a good hiding spot along their fleeing path. - - -llExecCharacterCmd(integer command, list options) -Send a command to the pathing system. - - -list llGetClosestNavPoint(vector point, list options) -Finds the closest navpoint and returns a list with a single vector if succesful. Returns empty list when no navpoints found. - - -llFleeFrom(vector source, float distance, list options) -Tells an object to keep away from a defined position in the region or adjacent regions. - - -llNavigateTo(vector pos, list options) -Tells an object to travel to a defined position in the region or adjacent regions. - - -llPatrolPoints(list patrolPoints, list options) -Sets the object patrolling between the points specified in patrolPoints. - - -llPursue(key target, list options) -Causes the object to pursue a target. - - -llUpdateCharacter(list options) -Updates settings for a character. - - -llWanderWithin(vector origin, float dist, list options) -Sets a character to wander about a central spot within a specified radius. - - -integer osIsNpc(key npc) -Returns TRUE if the given key is an NPC, false otherwise. -(OpenSim only.) - - -key osNpcGetOwner(key npc) -Return the owner key of the given NPC. If the NPC is unowned or the input key does not belong to an NPC then it returns NULL_KEY. -(OpenSim only.) - - -string osGetGridCustom(string key) -Reads configuration strings from the [GridInfo] setion in OpenSim.ini. -(OpenSim only.) - - -string osGetGridHomeURI() -Returns the hypergrid URI of the grid where the user logged in. -(OpenSim only.) - - -osNpcPlayAnimation(key npc, string animation) -Get an NPC to play an animation. The animation can either be a key or the name of an animation in the same object as the script. -(OpenSim only.) - - -osNpcSit(key npc, key target, integer options) -Sit an NPC on a prim target. No options have been implemented yet, so always input 0. -(OpenSim only.) - - -osNpcStand(key npc) -Make an NPC stand up. -(OpenSim only.) - - -osNpcStopAnimation(key npc, string animation) -Get an NPC to stop playing an animation. The animation can either be a key or the name of an animation in the same inventory as the script. -(OpenSim only.) - - -osSetRot(key target, quaternion rotation) -Rotates an object or avatar. -(OpenSim only.) - diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0c06505e4..e595d9e13 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -837,7 +837,7 @@ class Linux_x86_64Manifest(LinuxManifest): self.path("libSDL-1.2.so*") self.path("libELFIO.so") self.path("libjpeg.so*") - self.path("libpng.so*") + self.path("libpng*.so*") self.path("libz.so*") # OpenAL