FIRE-8046: Support for Aurora Sim Var region - Adapted from Angstrom Viewer with thanks to nhede Core and Revolution Smythe. Also adds support for certain other aurora-sim features which still need some work.
parent
5d2838e0f6
commit
3e13995a3d
|
|
@ -147,6 +147,14 @@ const char WATER_LAYER_CODE = 'W';
|
|||
const char WIND_LAYER_CODE = '7';
|
||||
const char CLOUD_LAYER_CODE = '8';
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
// Extended land layer for Aurora Sim
|
||||
const char AURORA_LAND_LAYER_CODE = 'M';
|
||||
const char AURORA_WATER_LAYER_CODE = 'X';
|
||||
const char AURORA_WIND_LAYER_CODE = '9';
|
||||
const char AURORA_CLOUD_LAYER_CODE = ':';
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// keys
|
||||
// Bit masks for various keyboard modifier keys.
|
||||
const MASK MASK_NONE = 0x0000;
|
||||
|
|
|
|||
|
|
@ -1376,3 +1376,10 @@ char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->get
|
|||
char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs");
|
||||
char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds");
|
||||
char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds");
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
char const* const _PREHASH_RegionSizeX = LLMessageStringTable::getInstance()->getString("RegionSizeX");
|
||||
char const* const _PREHASH_RegionSizeY = LLMessageStringTable::getInstance()->getString("RegionSizeY");
|
||||
char const* const _PREHASH_SizeX = LLMessageStringTable::getInstance()->getString("SizeX");
|
||||
char const* const _PREHASH_SizeY = LLMessageStringTable::getInstance()->getString("SizeY");
|
||||
// </FS:CR> Aurora Sim
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,11 @@ extern char const* const _PREHASH_ProductSKU;
|
|||
extern char const* const _PREHASH_SeeAVs;
|
||||
extern char const* const _PREHASH_AnyAVSounds;
|
||||
extern char const* const _PREHASH_GroupAVSounds;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
extern char const* const _PREHASH_RegionSizeX;
|
||||
extern char const* const _PREHASH_RegionSizeY;
|
||||
extern char const* const _PREHASH_SizeX;
|
||||
extern char const* const _PREHASH_SizeY;
|
||||
// <FS:CR> Aurora Sim
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -229,7 +229,10 @@ void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp)
|
|||
gPatchSize = gopp->patch_size;
|
||||
}
|
||||
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||
// <FS:CR> Aurora Sim
|
||||
//void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_patch)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
U8 retvalu8;
|
||||
|
||||
|
|
@ -268,15 +271,41 @@ void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
|||
#endif
|
||||
ph->range = retvalu16;
|
||||
|
||||
retvalu16 = 0;
|
||||
// <FS:CR> Aurora Sim
|
||||
//retvalu16 = 0;
|
||||
retvalu32 = 0;
|
||||
#ifdef LL_BIG_ENDIAN
|
||||
ret = (U8 *)&retvalu16;
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 2);
|
||||
// <FS:CR> Aurora Sim
|
||||
//ret = (U8 *)&retvalu16;
|
||||
if(b_large_patch)
|
||||
{
|
||||
//todo test
|
||||
ret = (U8 *)&retvalu32;
|
||||
bitpack.bitUnpack(&(ret[3]), 8);
|
||||
bitpack.bitUnpack(&(ret[2]), 8);
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = (U8 *)&retvalu32;
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 2);
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
#else
|
||||
bitpack.bitUnpack((U8 *)&retvalu16, 10);
|
||||
// <FS:CR> Aurora Sim
|
||||
//bitpack.bitUnpack((U8 *)&retvalu16, 10);
|
||||
if(b_large_patch)
|
||||
bitpack.bitUnpack((U8 *)&retvalu32, 32);
|
||||
else
|
||||
bitpack.bitUnpack((U8 *)&retvalu32, 10);
|
||||
// </FS:CR> Aurora Sim
|
||||
#endif
|
||||
ph->patchids = retvalu16;
|
||||
// <FS:CR> Aurora Sim
|
||||
//ph->patchids = retvalu16;
|
||||
ph->patchids = retvalu32;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
gWordBits = (ph->quant_wbits & 0xf) + 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@ void end_patch_coding(LLBitPack &bitpack);
|
|||
|
||||
void init_patch_decoding(LLBitPack &bitpack);
|
||||
void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp);
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph);
|
||||
// <FS:CR> Aurora Sim
|
||||
//void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph);
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_patch);
|
||||
// </FS:CR> Aurora Sim
|
||||
void decode_patch(LLBitPack &bitpack, S32 *patches);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -73,7 +73,10 @@ public:
|
|||
F32 dc_offset; // 4 bytes
|
||||
U16 range; // 2 = 7 ((S16) FP range (breaks if we need > 32K meters in 1 patch)
|
||||
U8 quant_wbits; // 1 = 8 (upper 4 bits is quant - 2, lower 4 bits is word bits - 2)
|
||||
U16 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
||||
// <FS:CR> Aurora Sim
|
||||
//U16 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
||||
U32 patchids;
|
||||
// </FS:CR> Aurora Sim
|
||||
};
|
||||
|
||||
// Compression routines
|
||||
|
|
|
|||
|
|
@ -181,6 +181,9 @@ LLGridManager::LLGridManager()
|
|||
: mIsInSLMain(false),
|
||||
mIsInSLBeta(false),
|
||||
mIsInOpenSim(false),
|
||||
// <FS:CR> Aurora Sim
|
||||
mIsInAuroraSim(false),
|
||||
// </FS:CR> Aurora Sim
|
||||
mReadyToLogin(false),
|
||||
mCommandLineDone(false),
|
||||
mResponderCount(0)
|
||||
|
|
@ -539,6 +542,71 @@ void LLGridManager::gridInfoResponderCB(GridEntry* grid_entry)
|
|||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[check] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
check = "search";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_SEARCH] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_SEARCH] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "profileuri";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_PROFILE_URI_VALUE] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_PROFILE_URI_VALUE] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "SendGridInfoToViewerOnLogin";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_SENDGRIDINFO] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_SENDGRIDINFO] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "DirectoryFee";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_DIRECTORY_FEE] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_DIRECTORY_FEE] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "CurrencySymbol";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_CURRENCY_SYMBOL] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_CURRENCY_SYMBOL] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "RealCurrencySymbol";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_REAL_CURRENCY_SYMBOL] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_REAL_CURRENCY_SYMBOL] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "MaxGroups";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_MAXGROUPS] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_MAXGROUPS] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "platform";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_PLATFORM] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_PLATFORM] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
check = "message";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_MESSAGE] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_MESSAGE] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
check = "helperuri";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
|
|
@ -1253,6 +1321,9 @@ void LLGridManager::updateIsInProductionGrid()
|
|||
mIsInSLMain = false;
|
||||
mIsInSLBeta = false;
|
||||
mIsInOpenSim = false;
|
||||
// <FS:CR> Aurora Sim
|
||||
mIsInAuroraSim = false;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice,
|
||||
// but it seems that loginURI trumps that.
|
||||
|
|
@ -1281,6 +1352,15 @@ void LLGridManager::updateIsInProductionGrid()
|
|||
return;
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
if(mGridList[mGrid][GRID_PLATFORM].asString() == "Aurora") {
|
||||
LL_DEBUGS("GridManager")<< "uri: "<< uris[0] << "set isInAuroraSim" << LL_ENDL;
|
||||
mIsInAuroraSim = true;
|
||||
mIsInOpenSim = true; //also enable opensim related options here
|
||||
return;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// TPVP compliance: a SL login screen must connect to SL.
|
||||
// NOTE: This is more TPVP compliant than LLs own viewer, where
|
||||
// setting the command line login page can be used for spoofing.
|
||||
|
|
|
|||
|
|
@ -52,6 +52,19 @@ extern const char* DEFAULT_LOGIN_PAGE;
|
|||
#define GRID_IS_FAVORITE_VALUE "favorite"
|
||||
#define GRID_REGISTER_NEW_ACCOUNT "register"
|
||||
#define GRID_FORGOT_PASSWORD "password"
|
||||
// <FS:CR> Aurora Sim
|
||||
#define GRID_HELP "help"
|
||||
#define GRID_ABOUT "about"
|
||||
#define GRID_SEARCH "search"
|
||||
#define GRID_PROFILE_URI_VALUE "profileuri"
|
||||
#define GRID_SENDGRIDINFO "SendGridInfoToViewerOnLogin"
|
||||
#define GRID_DIRECTORY_FEE "DirectoryFee"
|
||||
#define GRID_CURRENCY_SYMBOL "CurrencySymbol"
|
||||
#define GRID_REAL_CURRENCY_SYMBOL "RealCurrencySymbol"
|
||||
#define GRID_MAXGROUPS "MaxGroups"
|
||||
#define GRID_PLATFORM "platform"
|
||||
#define GRID_MESSAGE "message"
|
||||
// <FS:CR> Aurora Sim
|
||||
// </AW opensim>
|
||||
#define GRID_IS_SYSTEM_GRID_VALUE "system_grid"
|
||||
#define GRID_IS_FAVORITE_VALUE "favorite"
|
||||
|
|
@ -235,6 +248,9 @@ public:
|
|||
bool isInSLMain();
|
||||
bool isInSLBeta();
|
||||
bool isInOpenSim();
|
||||
// <FS:CR> Aurora Sim
|
||||
bool isInAuroraSim();
|
||||
// </FS:CR> Aurora Sim
|
||||
void saveGridList();
|
||||
// </AW opensim>
|
||||
void clearFavorites();
|
||||
|
|
@ -269,6 +285,9 @@ protected:
|
|||
bool mIsInSLMain;
|
||||
bool mIsInSLBeta;
|
||||
bool mIsInOpenSim;
|
||||
// <FS:CR> Aurora Sim
|
||||
bool mIsInAuroraSim;
|
||||
// </FS:CR> Aurora Sim
|
||||
int mResponderCount;
|
||||
bool mReadyToLogin;
|
||||
bool mCommandLineDone;
|
||||
|
|
|
|||
|
|
@ -2578,7 +2578,10 @@ void LLAgent::setStartPosition( U32 location_id )
|
|||
// this simulator. Clamp it to the region the agent is
|
||||
// in, a little bit in on each side.
|
||||
const F32 INSET = 0.5f; //meters
|
||||
const F32 REGION_WIDTH = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F32 REGION_WIDTH = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
const F32 REGION_WIDTH = getRegion()->getWidth();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLVector3 agent_pos = getPositionAgent();
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "llvoiceclient.h"
|
||||
|
||||
#include "llworld.h" // <FS:CR> Aurora Sim
|
||||
|
||||
bool LLAvatarListItem::sStaticInitialized = false;
|
||||
S32 LLAvatarListItem::sLeftPadding = 0;
|
||||
S32 LLAvatarListItem::sNameRightPadding = 0;
|
||||
|
|
@ -443,9 +445,15 @@ void LLAvatarListItem::setRange(F32 distance)
|
|||
// Get default style params
|
||||
LLStyle::Params rangeHighlight = LLStyle::Params();
|
||||
|
||||
if (mUseRangeColors && mDistance > CHAT_NORMAL_RADIUS)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (mUseRangeColors && mDistance > CHAT_NORMAL_RADIUS)
|
||||
if (mUseRangeColors && mDistance > LLWorld::getInstance()->getSayDistance())
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
if (mDistance < CHAT_SHOUT_RADIUS)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (mDistance < CHAT_SHOUT_RADIUS)
|
||||
if (mDistance < LLWorld::getInstance()->getShoutDistance())
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
rangeHighlight.color = mShoutRangeColor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
|
||||
#include "rlvhandler.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llworld.h" // <FS:CR> Aurora Sim />
|
||||
|
||||
//
|
||||
// Constants
|
||||
|
|
@ -269,7 +270,13 @@ void LLFloaterMap::draw()
|
|||
mPopupMenu->setItemEnabled("Stop Tracking", true);
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLFloater::draw();
|
||||
if(LLWorld::getInstance()->getAllowMinimap())
|
||||
{
|
||||
LLFloater::draw();
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
}
|
||||
|
||||
void LLFloaterMap::stretchMiniMap(S32 width,S32 height)
|
||||
|
|
@ -369,4 +376,4 @@ void LLFloaterMap::handleStartTracking()
|
|||
{
|
||||
mMap->startTracking();
|
||||
}
|
||||
// </FS:Ansariel> Avatar tracking feature
|
||||
// </FS:Ansariel> Avatar tracking feature
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@
|
|||
#include "llselectmgr.h"
|
||||
#include "llmeshrepository.h"
|
||||
|
||||
#include "llviewernetwork.h" // <FS:CR> Aurora Sim
|
||||
|
||||
// Globals
|
||||
LLFloaterTools *gFloaterTools = NULL;
|
||||
bool LLFloaterTools::sShowObjectCost = true;
|
||||
|
|
@ -220,6 +222,13 @@ LLPCode toolData[]={
|
|||
LL_PCODE_LEGACY_TREE,
|
||||
LL_PCODE_LEGACY_GRASS};
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLFloaterTools::updateToolsSizeLimits()
|
||||
{
|
||||
mPanelObject->updateLimits();
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
BOOL LLFloaterTools::postBuild()
|
||||
{
|
||||
// Hide until tool selected
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ public:
|
|||
static void* createPanelContents(void* vdata);
|
||||
static void* createPanelLandInfo(void* vdata);
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void updateToolsSizeLimits();
|
||||
// </FS:CR> Aurora Sim
|
||||
LLFloaterTools(const LLSD& key);
|
||||
virtual ~LLFloaterTools();
|
||||
|
||||
|
|
|
|||
|
|
@ -664,8 +664,14 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
|||
}
|
||||
|
||||
std::string sim_name = sim_info->getName();
|
||||
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
|
||||
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
|
||||
//F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
|
||||
U32 locX, locY;
|
||||
from_region_handle(sim_info->getHandle(), &locX, &locY);
|
||||
F32 region_x = pos_global.mdV[VX] - locX;
|
||||
F32 region_y = pos_global.mdV[VY] - locY;
|
||||
// </FS:CR> Aurora Sim
|
||||
std::string full_name = llformat("%s (%d, %d, %d)",
|
||||
sim_name.c_str(),
|
||||
llround(region_x),
|
||||
|
|
@ -717,11 +723,20 @@ void LLFloaterWorldMap::enableTeleportCoordsDisplay( bool enabled )
|
|||
void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
|
||||
{
|
||||
// if we're going to update their value, we should also enable them
|
||||
// <FS:CR> Aurora Sim
|
||||
LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos );
|
||||
//<FS:CR> Aurora Sim
|
||||
enableTeleportCoordsDisplay( true );
|
||||
|
||||
// convert global specified position to a local one
|
||||
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
|
||||
F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
|
||||
//F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
|
||||
U32 locX, locY;
|
||||
from_region_handle(sim_info->getHandle(), &locX, &locY);
|
||||
F32 region_local_x = pos.mdV[VX] - locX;
|
||||
F32 region_local_y = pos.mdV[VY] - locY;
|
||||
// </FS:CR> Aurora Sim
|
||||
//F32 region_local_z = (F32)fmod( pos.mdV[VZ], (F64)REGION_WIDTH_METERS );
|
||||
F32 region_local_z = (F32)pos.mdV[VZ];
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include "rlvhandler.h"
|
||||
#include "rlvui.h"
|
||||
// [/RLVa:KB]
|
||||
#include "llworld.h" // <FS:CR> Aurora Sim
|
||||
|
||||
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
|
||||
// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
|
||||
|
|
@ -269,7 +270,10 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
|
|||
give_successful = false;
|
||||
}
|
||||
count = items.count() + cats.count();
|
||||
if (count > MAX_ITEMS)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (count > MAX_ITEMS)
|
||||
if (count > LLWorld::getInstance()->getMaxInventoryItemsTransfer())
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLNotificationsUtil::add("TooManyItems");
|
||||
give_successful = false;
|
||||
|
|
@ -552,7 +556,10 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
|
|||
// MTUBYTES or 18 * count < 1200 => count < 1200/18 =>
|
||||
// 66. I've cut it down a bit from there to give some pad.
|
||||
S32 count = items.count() + cats.count();
|
||||
if (count > MAX_ITEMS)
|
||||
// <FS:CR> Aurora Sim>
|
||||
//if (count > MAX_ITEMS)
|
||||
if (count > LLWorld::getInstance()->getMaxInventoryItemsTransfer())
|
||||
// <FS:CR> Aurora Sim
|
||||
{
|
||||
LLNotificationsUtil::add("TooManyItems");
|
||||
give_successful = false;
|
||||
|
|
|
|||
|
|
@ -291,7 +291,10 @@ void LLWind::renderVectors()
|
|||
S32 i,j;
|
||||
F32 x,y;
|
||||
|
||||
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 region_width_meters = gAgent.getRegion()->getWidth();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.pushMatrix();
|
||||
|
|
@ -497,7 +500,10 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei
|
|||
{
|
||||
// HACK: At edge of last region of world, we need to make sure the region
|
||||
// resolves correctly so we can get a height value.
|
||||
const F32 BORDER = REGION_WIDTH_METERS - 0.1f;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F32 BORDER = REGION_WIDTH_METERS - 0.1f;
|
||||
const F32 BORDER = regionp->getWidth() - 0.1f;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
F32 clamped_x1 = x1;
|
||||
F32 clamped_y1 = y1;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
#include "llresmgr.h"
|
||||
#include "pipeline.h"
|
||||
#include "llglheaders.h"
|
||||
#include "llviewerregion.h" // <FS:CR> Aurora Sim
|
||||
|
||||
// Local constants...
|
||||
const S32 VERTICAL_OFFSET = 50;
|
||||
|
|
@ -414,7 +415,8 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
|
|||
grid_rot.getAngleAxis(&angle_radians, &x, &y, &z);
|
||||
gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
|
||||
|
||||
F32 region_size = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
//F32 region_size = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 region_size = object->getRegion()->getWidth();
|
||||
|
||||
const F32 LINE_ALPHA = 0.33f;
|
||||
|
||||
|
|
|
|||
|
|
@ -531,7 +531,10 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
// You can't move more than some distance from your original mousedown point.
|
||||
if (gSavedSettings.getBOOL("LimitDragDistance"))
|
||||
{
|
||||
F32 max_drag_distance = gSavedSettings.getF32("MaxDragDistance");
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 max_drag_distance = gSavedSettings.getF32("MaxDragDistance");
|
||||
F32 max_drag_distance = LLWorld::getInstance()->getMaxDragDistance();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,7 +170,10 @@ void LLNetMap::setScale( F32 scale )
|
|||
F32 height = (F32)(getRect().getHeight());
|
||||
F32 diameter = sqrt(width * width + height * height);
|
||||
F32 region_widths = diameter / mScale;
|
||||
F32 meters = region_widths * LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 meters = region_widths * LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 meters = region_widths * REGION_WIDTH_METERS;
|
||||
// </FS:CR> Aurora Sim
|
||||
F32 num_pixels = (F32)mObjectImagep->getWidth();
|
||||
mObjectMapTPM = num_pixels / meters;
|
||||
mObjectMapPixels = diameter;
|
||||
|
|
@ -262,7 +265,10 @@ void LLNetMap::draw()
|
|||
}
|
||||
|
||||
// figure out where agent is
|
||||
S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters());
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters());
|
||||
S32 region_width = llround(REGION_WIDTH_METERS);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
|
|
@ -277,8 +283,12 @@ void LLNetMap::draw()
|
|||
// background region rectangle
|
||||
F32 bottom = relative_y;
|
||||
F32 left = relative_x;
|
||||
F32 top = bottom + mScale ;
|
||||
F32 right = left + mScale ;
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 top = bottom + mScale ;
|
||||
//F32 right = left + mScale ;
|
||||
F32 top = bottom + (regionp->getWidth() / region_width) * mScale ;
|
||||
F32 right = left + (regionp->getWidth() / region_width) * mScale ;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
if (regionp == gAgent.getRegion())
|
||||
{
|
||||
|
|
@ -539,13 +549,20 @@ void LLNetMap::draw()
|
|||
static LLUICachedControl<bool> chat_ring("MiniMapChatRing", true);
|
||||
if(chat_ring)
|
||||
{
|
||||
drawRing(20.0, pos_map, map_chat_ring_color);
|
||||
drawRing(100.0, pos_map, map_shout_ring_color);
|
||||
// <FS:CR> Aurora Sim
|
||||
//drawRing(20.0, pos_map, map_chat_ring_color);
|
||||
//drawRing(100.0, pos_map, map_shout_ring_color);
|
||||
drawRing(LLWorld::getInstance()->getSayDistance(), pos_map, map_chat_ring_color);
|
||||
drawRing(LLWorld::getInstance()->getShoutDistance(), pos_map, map_shout_ring_color);
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
|
||||
// Draw frustum
|
||||
F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 meters_to_pixels = mScale/ REGION_WIDTH_METERS;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
F32 horiz_fov = LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect();
|
||||
F32 far_clip_meters = LLViewerCamera::getInstance()->getFar();
|
||||
|
|
@ -607,6 +624,9 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
|
|||
LLVector3 pos_local;
|
||||
pos_local.setVec(relative_pos_global); // convert to floats from doubles
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
|
||||
// </FS:CR> Aurora Sim
|
||||
pos_local.mV[VX] *= mPixelsPerMeter;
|
||||
pos_local.mV[VY] *= mPixelsPerMeter;
|
||||
// leave Z component in meters
|
||||
|
|
@ -628,7 +648,10 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
|
|||
void LLNetMap::drawRing(const F32 radius, const LLVector3 pos_map, const LLUIColor& color)
|
||||
|
||||
{
|
||||
F32 meters_to_pixels = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 meters_to_pixels = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 meters_to_pixels = mScale / REGION_WIDTH_METERS;
|
||||
// </FS:CR> Aurora Sim
|
||||
F32 radius_pixels = radius * meters_to_pixels;
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
|
@ -680,7 +703,10 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
|
|||
pos_local.rotVec( rot );
|
||||
}
|
||||
|
||||
pos_local *= ( LLWorld::getInstance()->getRegionWidthInMeters() / mScale );
|
||||
// <FS:CR> Aurora Sim
|
||||
//pos_local *= ( LLWorld::getInstance()->getRegionWidthInMeters() / mScale );
|
||||
pos_local *= ( REGION_WIDTH_METERS / mScale );
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLVector3d pos_global;
|
||||
pos_global.setVec( pos_local );
|
||||
|
|
@ -1341,4 +1367,4 @@ void LLNetMap::performDoubleClickAction(LLVector3d pos_global)
|
|||
break;
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel> Synchronize double click handling throughout instances
|
||||
// </FS:Ansariel> Synchronize double click handling throughout instances
|
||||
|
|
|
|||
|
|
@ -334,6 +334,10 @@ BOOL LLPanelObject::postBuild()
|
|||
// Start with everyone disabled
|
||||
clearCtrls();
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
updateLimits();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -367,10 +371,16 @@ void LLPanelObject::updateLimits()
|
|||
{
|
||||
mLimitsNeedUpdate = false;
|
||||
|
||||
mRegionMaxHeight = LLWorld::getInstance()->getRegionMaxHeight();
|
||||
mCtrlPosZ->setMaxValue(mRegionMaxHeight);
|
||||
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
//mRegionMaxHeight = LLWorld::getInstance()->getRegionMaxHeight();
|
||||
//mCtrlPosZ->setMaxValue(mRegionMaxHeight);
|
||||
mCtrlPosX->setMinValue(LLWorld::getInstance()->getMinPrimXPos());
|
||||
mCtrlPosX->setMaxValue(LLWorld::getInstance()->getMaxPrimXPos());
|
||||
mCtrlPosY->setMinValue(LLWorld::getInstance()->getMinPrimYPos());
|
||||
mCtrlPosY->setMaxValue(LLWorld::getInstance()->getMaxPrimYPos());
|
||||
mCtrlPosZ->setMinValue(LLWorld::getInstance()->getMinPrimZPos());
|
||||
mCtrlPosZ->setMaxValue(LLWorld::getInstance()->getMaxPrimZPos());
|
||||
// </FS:CR> Aurora Sim
|
||||
mMinScale = LLWorld::getInstance()->getRegionMinPrimScale();
|
||||
mMaxScale = LLWorld::getInstance()->getRegionMaxPrimScale();
|
||||
mCtrlScaleX->setMinValue(mMinScale);
|
||||
|
|
@ -386,6 +396,9 @@ void LLPanelObject::updateLimits()
|
|||
mMinHoleSize = LLWorld::getInstance()->getRegionMinHoleSize();
|
||||
mSpinScaleX->setMinValue(mMinHoleSize);
|
||||
mSpinScaleY->setMinValue(mMinHoleSize);
|
||||
// <FS:CR> Aurora Sim
|
||||
mCheckPhysics->setEnabled(LLWorld::getInstance()->getAllowPhysicalPrims());
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
// </AW: opensim-limits>
|
||||
|
||||
|
|
@ -2400,8 +2413,12 @@ void LLPanelObject::onPastePos(const LLSD& data)
|
|||
//clamp pos on non-attachments, just keep the prims on the sim
|
||||
if (!mObject->isAttachment())
|
||||
{
|
||||
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], 0.f, 256.f);
|
||||
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], 0.f, 256.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], 0.f, 256.f);
|
||||
//mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], 0.f, 256.f);
|
||||
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], 0.f, gAgent.getRegion()->getWidth());
|
||||
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], 0.f, gAgent.getRegion()->getWidth());
|
||||
// </FS:CR> Aurora Sim
|
||||
//height will get properly clammed by sendPosition
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,10 @@ void LLPanelPeople::updateNearbyList()
|
|||
if (lastRadarSweep.count(avId) == 0)
|
||||
{
|
||||
// chat alerts
|
||||
if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS) && avRange > -1)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS) && avRange > -1)
|
||||
if (RadarReportChatRangeEnter && (avRange <= LLWorld::getInstance()->getSayDistance()) && avRange > -1)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["DISTANCE"] = llformat("%3.2f", avRange);
|
||||
|
|
@ -1070,14 +1073,20 @@ void LLPanelPeople::updateNearbyList()
|
|||
rf = lastRadarSweep.find(avId)->second;
|
||||
if (RadarReportChatRangeEnter || RadarReportChatRangeLeave )
|
||||
{
|
||||
if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS && avRange > -1) && (rf.lastDistance > CHAT_NORMAL_RADIUS || rf.lastDistance == -1))
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS && avRange > -1) && (rf.lastDistance > CHAT_NORMAL_RADIUS || rf.lastDistance == -1))
|
||||
if (RadarReportChatRangeEnter && (avRange <= LLWorld::getInstance()->getSayDistance() && avRange > -1) && (rf.lastDistance > LLWorld::getInstance()->getSayDistance() || rf.lastDistance == -1))
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["DISTANCE"] = llformat("%3.2f", avRange);
|
||||
std::string message = getString("entering_chat_range", args);
|
||||
LLAvatarNameCache::get(avId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, message));
|
||||
}
|
||||
else if (RadarReportChatRangeLeave && (avRange > CHAT_NORMAL_RADIUS || avRange == -1) && (rf.lastDistance <= CHAT_NORMAL_RADIUS && rf.lastDistance > -1))
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (RadarReportChatRangeLeave && (avRange > CHAT_NORMAL_RADIUS || avRange == -1) && (rf.lastDistance <= CHAT_NORMAL_RADIUS && rf.lastDistance > -1))
|
||||
else if (RadarReportChatRangeLeave && (avRange > LLWorld::getInstance()->getSayDistance() || avRange == -1) && (rf.lastDistance <= LLWorld::getInstance()->getSayDistance() && rf.lastDistance > -1))
|
||||
// </FS:CR> Aurora Sim
|
||||
LLAvatarNameCache::get(avId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, getString("leaving_chat_range")));
|
||||
}
|
||||
if ( RadarReportDrawRangeEnter || RadarReportDrawRangeLeave )
|
||||
|
|
@ -1125,14 +1134,20 @@ void LLPanelPeople::updateNearbyList()
|
|||
|
||||
if (RadarReportChatRangeEnter || RadarReportChatRangeLeave)
|
||||
{
|
||||
if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS && avRange > -1) && (rf.lastDistance > CHAT_NORMAL_RADIUS || rf.lastDistance == -1))
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (RadarReportChatRangeEnter && (avRange <= CHAT_NORMAL_RADIUS && avRange > -1) && (rf.lastDistance > CHAT_NORMAL_RADIUS || rf.lastDistance == -1))
|
||||
if (RadarReportChatRangeEnter && (avRange <= LLWorld::getInstance()->getSayDistance() && avRange > -1) && (rf.lastDistance > LLWorld::getInstance()->getSayDistance() || rf.lastDistance == -1))
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["DISTANCE"] = llformat("%3.2f", avRange);
|
||||
std::string message = getString("entering_chat_range", args);
|
||||
LLAvatarNameCache::get(avId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, message));
|
||||
}
|
||||
else if (RadarReportChatRangeLeave && (avRange > CHAT_NORMAL_RADIUS || avRange == -1) && (rf.lastDistance <= CHAT_NORMAL_RADIUS && rf.lastDistance > -1))
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (RadarReportChatRangeLeave && (avRange > CHAT_NORMAL_RADIUS || avRange == -1) && (rf.lastDistance <= CHAT_NORMAL_RADIUS && rf.lastDistance > -1))
|
||||
else if (RadarReportChatRangeLeave && (avRange > LLWorld::getInstance()->getSayDistance() || avRange == -1) && (rf.lastDistance <= LLWorld::getInstance()->getSayDistance() && rf.lastDistance > -1))
|
||||
// </FS:CR> Aurora Sim
|
||||
LLAvatarNameCache::get(avId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, getString("leaving_chat_range")));
|
||||
}
|
||||
if (RadarReportDrawRangeEnter || RadarReportDrawRangeLeave)
|
||||
|
|
@ -1357,7 +1372,10 @@ void LLPanelPeople::updateNearbyList()
|
|||
if (!mNearbyList->contains(prevId))
|
||||
{
|
||||
radarFields rf = i->second;
|
||||
if (RadarReportChatRangeLeave && (rf.lastDistance <= CHAT_NORMAL_RADIUS) && rf.lastDistance > -1)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (RadarReportChatRangeLeave && (rf.lastDistance <= CHAT_NORMAL_RADIUS) && rf.lastDistance > -1)
|
||||
if (RadarReportChatRangeLeave && (rf.lastDistance <= LLWorld::getInstance()->getSayDistance()) && rf.lastDistance > -1)
|
||||
// </FS:CR> Aurora Sim
|
||||
LLAvatarNameCache::get(prevId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, getString("leaving_chat_range")));
|
||||
if (RadarReportDrawRangeLeave && (rf.lastDistance <= drawRadius) && rf.lastDistance > -1)
|
||||
LLAvatarNameCache::get(prevId,boost::bind(&LLPanelPeople::radarAlertMsg, this, _1, _2, getString("leaving_draw_distance")));
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@
|
|||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
// <FS:CR> Aurora Sim
|
||||
#include "llviewernetwork.h"
|
||||
#include "llworld.h"
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
||||
|
|
@ -576,11 +580,19 @@ bool LLSelectMgr::linkObjects()
|
|||
}
|
||||
|
||||
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
|
||||
if (object_count > MAX_CHILDREN_PER_TASK + 1)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (object_count > MAX_CHILDREN_PER_TASK + 1)
|
||||
S32 object_max = LLWorld::getInstance()->getMaxLinkedPrims();
|
||||
|
||||
if (object_count > object_max + 1)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLSD args;
|
||||
args["COUNT"] = llformat("%d", object_count);
|
||||
int max = MAX_CHILDREN_PER_TASK+1;
|
||||
// <FS:CR> Aurora Sim
|
||||
//int max = MAX_CHILDREN_PER_TASK+1;
|
||||
int max = object_max+1;
|
||||
// </FS:CR> Aurora Sim
|
||||
args["MAX"] = llformat("%d", max);
|
||||
LLNotificationsUtil::add("UnableToLinkObjects", args);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -920,7 +920,10 @@ void LLLocalSpeakerMgr::updateSpeakerList()
|
|||
// pick up non-voice speakers in chat range
|
||||
uuid_vec_t avatar_ids;
|
||||
std::vector<LLVector3d> positions;
|
||||
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
|
||||
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), LLWorld::getInstance()->getSayDistance());
|
||||
// </FS:CR> Aurora Sim
|
||||
for(U32 i=0; i<avatar_ids.size(); i++)
|
||||
{
|
||||
setSpeaker(avatar_ids[i]);
|
||||
|
|
@ -934,7 +937,11 @@ void LLLocalSpeakerMgr::updateSpeakerList()
|
|||
if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
|
||||
{
|
||||
LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
|
||||
if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS_SQUARED)
|
||||
// <FS:CR> Aurora Sim
|
||||
F32 say_distance_squared = (LLWorld::getInstance()->getSayDistance() * LLWorld::getInstance()->getSayDistance());
|
||||
if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > say_distance_squared)
|
||||
//if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS_SQUARED)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
setSpeakerNotInChannel(speakerp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,7 +301,10 @@ LLSD transform_cert_args(LLPointer<LLCertificate> cert);
|
|||
void general_cert_done(const LLSD& notification, const LLSD& response);
|
||||
void trust_cert_done(const LLSD& notification, const LLSD& response);
|
||||
void apply_udp_blacklist(const std::string& csv);
|
||||
bool process_login_success_response();
|
||||
// <FS:CR> Aurora Sim
|
||||
//bool process_login_success_response();
|
||||
bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
void transition_back_to_login_panel(const std::string& emsg);
|
||||
void cmdline_printchat(std::string message);
|
||||
|
||||
|
|
@ -396,6 +399,10 @@ bool idle_startup()
|
|||
static std::string auth_desc;
|
||||
static std::string auth_message;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
static U32 first_sim_size_x = 256;
|
||||
static U32 first_sim_size_y = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
|
||||
static LLVector3 agent_start_position_region(10.f, 10.f, 10.f); // default for when no space server
|
||||
|
||||
|
|
@ -1399,7 +1406,10 @@ bool idle_startup()
|
|||
}
|
||||
else if(LLLoginInstance::getInstance()->authSuccess())
|
||||
{
|
||||
if(process_login_success_response())
|
||||
// <FS:CR> Aurora Sim
|
||||
//if(process_login_success_response())
|
||||
if(process_login_success_response(first_sim_size_x,first_sim_size_y))
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <AW: crash report grid correctness>
|
||||
const std::string current_grid = LLGridManager::getInstance()->getGrid();
|
||||
|
|
@ -1500,7 +1510,10 @@ bool idle_startup()
|
|||
gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
|
||||
display_startup();
|
||||
|
||||
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
|
||||
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, first_sim_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
display_startup();
|
||||
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
|
||||
|
|
@ -3461,7 +3474,10 @@ void apply_udp_blacklist(const std::string& csv)
|
|||
|
||||
}
|
||||
|
||||
bool process_login_success_response()
|
||||
// <FS:CR> Aurora Sim
|
||||
//bool process_login_success_response()
|
||||
bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLSD response = LLLoginInstance::getInstance()->getResponse();
|
||||
|
||||
|
|
@ -3588,6 +3604,17 @@ bool process_login_success_response()
|
|||
gFirstSimHandle = to_region_handle(region_x, region_y);
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
text = response["region_size_x"].asString();
|
||||
if(!text.empty()) {
|
||||
first_sim_size_x = strtoul(text.c_str(), NULL, 10);
|
||||
LLViewerParcelMgr::getInstance()->init(first_sim_size_x);
|
||||
}
|
||||
|
||||
//region Y size is currently unused, major refactoring required. - Patrick Sapinski (2/10/2011)
|
||||
text = response["region_size_y"].asString();
|
||||
if(!text.empty()) first_sim_size_y = strtoul(text.c_str(), NULL, 10);
|
||||
// </FS:CR> Aurora Sim
|
||||
const std::string look_at_str = response["look_at"];
|
||||
if (!look_at_str.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,6 +170,9 @@ void LLSurface::create(const S32 grids_per_edge,
|
|||
mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge;
|
||||
mMetersPerGrid = width / ((F32)(mGridsPerEdge - 1));
|
||||
mMetersPerEdge = mMetersPerGrid * (mGridsPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
sTextureSize = width;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
mOriginGlobal.setVec(origin_global);
|
||||
|
||||
|
|
@ -288,13 +291,40 @@ void LLSurface::initTextures()
|
|||
//
|
||||
// Water texture
|
||||
//
|
||||
if (gSavedSettings.getBOOL("RenderWater") )
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (gSavedSettings.getBOOL("RenderWater") )
|
||||
if (gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater())
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
createWaterTexture();
|
||||
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
|
||||
gPipeline.createObject(mWaterObjp);
|
||||
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
|
||||
water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
|
||||
// FS:CR> Aurora Sim
|
||||
//water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
|
||||
water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
|
||||
mWaterObjp->setPositionGlobal(water_pos_global);
|
||||
}
|
||||
}
|
||||
|
||||
void LLSurface::rebuildWater()
|
||||
{
|
||||
BOOL renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater();
|
||||
BOOL prev_renderwater = !mWaterObjp.isNull();
|
||||
|
||||
if(prev_renderwater && !renderwater)
|
||||
{
|
||||
gObjectList.killObject(mWaterObjp);
|
||||
}
|
||||
|
||||
if (!prev_renderwater && renderwater)
|
||||
{
|
||||
createWaterTexture();
|
||||
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
|
||||
gPipeline.createObject(mWaterObjp);
|
||||
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
|
||||
water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
|
||||
// </FS:CR> Aurora Sim
|
||||
mWaterObjp->setPositionGlobal(water_pos_global);
|
||||
}
|
||||
}
|
||||
|
|
@ -324,8 +354,12 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
|
|||
// Hack!
|
||||
if (mWaterObjp.notNull() && mWaterObjp->mDrawable.notNull())
|
||||
{
|
||||
const F64 x = origin_global.mdV[VX] + 128.0;
|
||||
const F64 y = origin_global.mdV[VY] + 128.0;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F64 x = origin_global.mdV[VX] + 128.0;
|
||||
//const F64 y = origin_global.mdV[VY] + 128.0;
|
||||
const F64 x = origin_global.mdV[VX] + (F64)mRegionp->getWidth()/2;
|
||||
const F64 y = origin_global.mdV[VY] + (F64)mRegionp->getWidth()/2;
|
||||
// </FS:CR> Aurora Sim
|
||||
const F64 z = mWaterObjp->getPositionGlobal().mdV[VZ];
|
||||
|
||||
LLVector3d water_origin_global(x, y, z);
|
||||
|
|
@ -363,15 +397,52 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
{
|
||||
S32 i;
|
||||
LLSurfacePatch *patchp, *neighbor_patchp;
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 neighborPatchesPerEdge = neighborp->mPatchesPerEdge;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
mNeighbors[direction] = neighborp;
|
||||
neighborp->mNeighbors[gDirOpposite[direction]] = this;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 ppe[2];
|
||||
S32 own_offset[2] = {0, 0};
|
||||
S32 neighbor_offset[2] = {0, 0};
|
||||
U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos;
|
||||
|
||||
ppe[0] = (mPatchesPerEdge < neighborPatchesPerEdge) ? mPatchesPerEdge : neighborPatchesPerEdge; // used for x
|
||||
ppe[1] = ppe[0]; // used for y
|
||||
|
||||
from_region_handle(mRegionp->getHandle(), &own_xpos, &own_ypos);
|
||||
from_region_handle(neighborp->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos);
|
||||
|
||||
if(own_ypos >= neighbor_ypos) {
|
||||
neighbor_offset[1] = (own_ypos - neighbor_ypos) / mGridsPerPatchEdge;
|
||||
ppe[1] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[1]);
|
||||
}
|
||||
else {
|
||||
own_offset[1] = (neighbor_ypos - own_ypos) / mGridsPerPatchEdge;
|
||||
ppe[1] = llmin(mPatchesPerEdge-own_offset[1], neighborPatchesPerEdge);
|
||||
}
|
||||
|
||||
if(own_xpos >= neighbor_xpos) {
|
||||
neighbor_offset[0] = (own_xpos - neighbor_xpos) / mGridsPerPatchEdge;
|
||||
ppe[0] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[0]);
|
||||
}
|
||||
else {
|
||||
own_offset[0] = (neighbor_xpos - own_xpos) / mGridsPerPatchEdge;
|
||||
ppe[0] = llmin(mPatchesPerEdge-own_offset[0], neighborPatchesPerEdge);
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
|
||||
// Connect patches
|
||||
if (NORTHEAST == direction)
|
||||
{
|
||||
patchp = getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(0, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(0, 0);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0], neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -381,8 +452,14 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
}
|
||||
else if (NORTHWEST == direction)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 off = mPatchesPerEdge + neighbor_offset[1] - own_offset[1];
|
||||
// </FS:CR> Aurora Sim
|
||||
patchp = getPatch(0, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, 0);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, off); //neighborPatchesPerEdge - 1
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -390,18 +467,31 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
else if (SOUTHWEST == direction)
|
||||
{
|
||||
patchp = getPatch(0, 0);
|
||||
neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, neighbor_offset[1] - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
neighbor_patchp->updateNorthEdge(); // Only update one of north or east.
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp->updateNorthEdge(); // Only update one of north or east.
|
||||
neighbor_patchp->updateEastEdge(); // Only update one of north or east.
|
||||
// </FS:CR> Aurora Sim
|
||||
neighbor_patchp->dirtyZ();
|
||||
}
|
||||
else if (SOUTHEAST == direction)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 off = mPatchesPerEdge + neighbor_offset[0] - own_offset[0];
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp = getPatch(mPatchesPerEdge - 1, 0);
|
||||
neighbor_patchp = neighborp->getPatch(0, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(0, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(off, neighbor_offset[1] - 1); //0
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -409,10 +499,17 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
else if (EAST == direction)
|
||||
{
|
||||
// Do east/west connections, first
|
||||
for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
neighbor_patchp = neighborp->getPatch(0, i);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -422,19 +519,33 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[1] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
neighbor_patchp = neighborp->getPatch(0, i+1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i+1);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i+1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHWEST);
|
||||
}
|
||||
// Now do southeast/northwest connections
|
||||
for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
neighbor_patchp = neighborp->getPatch(0, i-1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i-1);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i-1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHWEST);
|
||||
|
|
@ -443,10 +554,17 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
else if (NORTH == direction)
|
||||
{
|
||||
// Do north/south connections, first
|
||||
for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -456,19 +574,33 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
}
|
||||
|
||||
// Do northeast/southwest connections
|
||||
for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[0] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i+1, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i+1, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i+1 + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHWEST);
|
||||
}
|
||||
// Do southeast/northwest connections
|
||||
for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i-1, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i-1, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i-1 + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHEAST);
|
||||
|
|
@ -477,10 +609,17 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
else if (WEST == direction)
|
||||
{
|
||||
// Do east/west connections, first
|
||||
for (i = 0; i < mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(0, i);
|
||||
neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -490,20 +629,34 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
for (i = 1; i < mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(0, i);
|
||||
neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i - 1);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i - 1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHEAST);
|
||||
}
|
||||
|
||||
// Now do northwest/southeast connections
|
||||
for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[1] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(0, i);
|
||||
neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i + 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i + 1);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + 1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHEAST);
|
||||
|
|
@ -512,10 +665,17 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
else if (SOUTH == direction)
|
||||
{
|
||||
// Do north/south connections, first
|
||||
for (i = 0; i < mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, 0);
|
||||
neighbor_patchp = neighborp->getPatch(i, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
|
@ -525,19 +685,33 @@ void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
|||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
for (i = 1; i < mPatchesPerEdge; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, 0);
|
||||
neighbor_patchp = neighborp->getPatch(i - 1, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i - 1, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i - 1 + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHEAST);
|
||||
}
|
||||
// Now do northeast/southwest connections
|
||||
for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[0] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
patchp = getPatch(i, 0);
|
||||
neighbor_patchp = neighborp->getPatch(i + 1, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i + 1, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i + 1 + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHWEST);
|
||||
|
|
@ -695,14 +869,29 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
|
|||
|
||||
while (1)
|
||||
{
|
||||
decode_patch_header(bitpack, &ph);
|
||||
// <FS:CR> Aurora Sim
|
||||
//decode_patch_header(bitpack, &ph);
|
||||
decode_patch_header(bitpack, &ph, b_large_patch);
|
||||
// </FS:CR> Aurora Sim
|
||||
if (ph.quant_wbits == END_OF_PATCHES)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
i = ph.patchids >> 5;
|
||||
j = ph.patchids & 0x1F;
|
||||
// <FS:CR> Aurora Sim
|
||||
//i = ph.patchids >> 5;
|
||||
//j = ph.patchids & 0x1F;
|
||||
if (b_large_patch)
|
||||
{
|
||||
i = ph.patchids >> 16; //x
|
||||
j = ph.patchids & 0xFFFF; //y
|
||||
}
|
||||
else
|
||||
{
|
||||
i = ph.patchids >> 5; //x
|
||||
j = ph.patchids & 0x1F; //y
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
|
||||
{
|
||||
|
|
@ -1224,7 +1413,10 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
|
|||
LLPointer<LLImageRaw> raw = new LLImageRaw(tex_width, tex_height, tex_comps);
|
||||
U8 *rawp = raw->getData();
|
||||
|
||||
F32 scale = 256.f * getMetersPerGrid() / (F32)tex_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 scale = 256.f * getMetersPerGrid() / (F32)tex_width;
|
||||
F32 scale = getRegion()->getWidth() * getMetersPerGrid() / (F32)tex_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
F32 scale_inv = 1.f / scale;
|
||||
|
||||
S32 x_begin, y_begin, x_end, y_end;
|
||||
|
|
|
|||
|
|
@ -85,6 +85,9 @@ public:
|
|||
void disconnectNeighbor(LLSurface *neighborp);
|
||||
void disconnectAllNeighbors();
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void rebuildWater();
|
||||
// </FS:CR> Aurora Sim
|
||||
virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch);
|
||||
virtual void updatePatchVisibilities(LLAgent &agent);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "timing.h"
|
||||
#include "llsky.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llregionhandle.h" // <FS:CR> Aurora Sim
|
||||
|
||||
// For getting composition values
|
||||
#include "llviewerregion.h"
|
||||
|
|
@ -248,18 +249,33 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
|
||||
const F32 mpg = mSurfacep->getMetersPerGrid() * stride;
|
||||
|
||||
S32 poffsets[2][2][2];
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 poffsets[2][2][2];
|
||||
S32 poffsets[2][2][3];
|
||||
// </FS:CR> Aurora Sim
|
||||
poffsets[0][0][0] = x - stride;
|
||||
poffsets[0][0][1] = y - stride;
|
||||
// <FS:CR> Aurora Sim
|
||||
poffsets[0][0][2] = surface_stride;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
poffsets[0][1][0] = x - stride;
|
||||
poffsets[0][1][1] = y + stride;
|
||||
// <FS:CR> Aurora Sim
|
||||
poffsets[0][1][2] = surface_stride;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
poffsets[1][0][0] = x + stride;
|
||||
poffsets[1][0][1] = y - stride;
|
||||
// <FS:CR> Aurora Sim
|
||||
poffsets[1][0][2] = surface_stride;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
poffsets[1][1][0] = x + stride;
|
||||
poffsets[1][1][1] = y + stride;
|
||||
// <FS:CR> Aurora Sim
|
||||
poffsets[1][1][2] = surface_stride;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
const LLSurfacePatch *ppatches[2][2];
|
||||
|
||||
|
|
@ -283,8 +299,11 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
}
|
||||
else
|
||||
{
|
||||
poffsets[i][j][0] += patch_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(WEST);
|
||||
poffsets[i][j][0] += patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][1] < 0)
|
||||
|
|
@ -295,8 +314,11 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
}
|
||||
else
|
||||
{
|
||||
poffsets[i][j][1] += patch_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(SOUTH);
|
||||
poffsets[i][j][1] += patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS>CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][0] >= (S32)patch_width)
|
||||
|
|
@ -307,8 +329,11 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
}
|
||||
else
|
||||
{
|
||||
poffsets[i][j][0] -= patch_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(EAST);
|
||||
poffsets[i][j][0] -= patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][1] >= (S32)patch_width)
|
||||
|
|
@ -319,8 +344,11 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
}
|
||||
else
|
||||
{
|
||||
poffsets[i][j][1] -= patch_width;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(NORTH);
|
||||
poffsets[i][j][1] -= patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -329,19 +357,31 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
|||
LLVector3 p00(-mpg,-mpg,
|
||||
*(ppatches[0][0]->mDataZ
|
||||
+ poffsets[0][0][0]
|
||||
+ poffsets[0][0][1]*surface_stride));
|
||||
// <FS:CR> Aurora Sim
|
||||
//+ poffsets[0][0][1]*surface_stride));
|
||||
+ poffsets[0][0][1]*poffsets[0][0][2]));
|
||||
// </FS:CR> Aurora Sim
|
||||
LLVector3 p01(-mpg,+mpg,
|
||||
*(ppatches[0][1]->mDataZ
|
||||
+ poffsets[0][1][0]
|
||||
+ poffsets[0][1][1]*surface_stride));
|
||||
// <FS:CR> Aurora Sim
|
||||
//+ poffsets[0][1][1]*surface_stride));
|
||||
+ poffsets[0][1][1]*poffsets[0][1][2]));
|
||||
// </FS:CR> Aurora Sim
|
||||
LLVector3 p10(+mpg,-mpg,
|
||||
*(ppatches[1][0]->mDataZ
|
||||
+ poffsets[1][0][0]
|
||||
+ poffsets[1][0][1]*surface_stride));
|
||||
// <FS:CR> Aurora Sim
|
||||
//+ poffsets[1][0][1]*surface_stride));
|
||||
+ poffsets[1][0][1]*poffsets[1][0][2]));
|
||||
// </FS:CR> Aurora Sim
|
||||
LLVector3 p11(+mpg,+mpg,
|
||||
*(ppatches[1][1]->mDataZ
|
||||
+ poffsets[1][1][0]
|
||||
+ poffsets[1][1][1]*surface_stride));
|
||||
// <FS:CR> Aurora Sim
|
||||
//+ poffsets[1][1][1]*surface_stride));
|
||||
+ poffsets[1][1][1]*poffsets[1][1][2]));
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLVector3 c1 = p11 - p00;
|
||||
LLVector3 c2 = p01 - p10;
|
||||
|
|
@ -476,6 +516,18 @@ void LLSurfacePatch::updateNormals()
|
|||
// update the north edge
|
||||
if (mNormalsInvalid[NORTHEAST] || mNormalsInvalid[NORTH] || mNormalsInvalid[NORTHWEST])
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
/*
|
||||
if(!getNeighborPatch(EAST) && getNeighborPatch(NORTHEAST))
|
||||
{
|
||||
if(getNeighborPatch(NORTHEAST)->getHasReceivedData())
|
||||
{
|
||||
*(getNeighborPatch(NORTHEAST)->mDataZ) = 100.0f;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (i = 0; i <= grids_per_patch_edge; i++)
|
||||
{
|
||||
calcNormal(i, grids_per_patch_edge, 2);
|
||||
|
|
@ -489,6 +541,16 @@ void LLSurfacePatch::updateNormals()
|
|||
// update the west edge
|
||||
if (mNormalsInvalid[NORTHWEST] || mNormalsInvalid[WEST] || mNormalsInvalid[SOUTHWEST])
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
if(!getNeighborPatch(NORTH) && getNeighborPatch(NORTHWEST))
|
||||
{
|
||||
if(getNeighborPatch(NORTHWEST)->getHasReceivedData())
|
||||
{
|
||||
*(mDataZ + grids_per_patch_edge*grids_per_edge) = *(getNeighborPatch(NORTHWEST)->mDataZ + grids_per_patch_edge);
|
||||
}
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (j = 0; j < grids_per_patch_edge; j++)
|
||||
{
|
||||
calcNormal(0, j, 2);
|
||||
|
|
@ -500,6 +562,17 @@ void LLSurfacePatch::updateNormals()
|
|||
// update the south edge
|
||||
if (mNormalsInvalid[SOUTHWEST] || mNormalsInvalid[SOUTH] || mNormalsInvalid[SOUTHEAST])
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
if(!getNeighborPatch(EAST) && getNeighborPatch(SOUTHEAST))
|
||||
{
|
||||
if(getNeighborPatch(SOUTHEAST)->getHasReceivedData())
|
||||
{
|
||||
*(mDataZ + grids_per_patch_edge) =
|
||||
*(getNeighborPatch(SOUTHEAST)->mDataZ + grids_per_patch_edge * getNeighborPatch(SOUTHEAST)->getSurface()->getGridsPerEdge());
|
||||
}
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (i = 0; i < grids_per_patch_edge; i++)
|
||||
{
|
||||
calcNormal(i, 0, 2);
|
||||
|
|
@ -528,7 +601,10 @@ void LLSurfacePatch::updateNormals()
|
|||
{
|
||||
// East, but not north. Pull from your east neighbor's northwest point.
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
*(getNeighborPatch(EAST)->mDataZ + (grids_per_patch_edge - 1)*grids_per_edge);
|
||||
// <FS:CR> Aurora Sim
|
||||
//*(getNeighborPatch(EAST)->mDataZ + (grids_per_patch_edge - 1)*grids_per_edge);
|
||||
*(getNeighborPatch(EAST)->mDataZ + (getNeighborPatch(EAST)->getSurface()->getGridsPerPatchEdge() - 1)*getNeighborPatch(EAST)->getSurface()->getGridsPerEdge());
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -553,7 +629,10 @@ void LLSurfacePatch::updateNormals()
|
|||
{
|
||||
// North, but not east. Pull from your north neighbor's southeast corner.
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
*(getNeighborPatch(NORTH)->mDataZ + (grids_per_patch_edge - 1));
|
||||
// <FS:CR> Aurora Sim
|
||||
//*(getNeighborPatch(NORTH)->mDataZ + (grids_per_patch_edge - 1));
|
||||
*(getNeighborPatch(NORTH)->mDataZ + (getNeighborPatch(NORTH)->getSurface()->getGridsPerPatchEdge() - 1));
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -570,8 +649,25 @@ void LLSurfacePatch::updateNormals()
|
|||
&&
|
||||
(!getNeighborPatch(EAST) || (getNeighborPatch(EAST)->mSurfacep != mSurfacep)))
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos;
|
||||
S32 own_offset = 0, neighbor_offset = 0;
|
||||
from_region_handle(mSurfacep->getRegion()->getHandle(), &own_xpos, &own_ypos);
|
||||
from_region_handle(getNeighborPatch(NORTHEAST)->mSurfacep->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos);
|
||||
if(own_ypos >= neighbor_ypos) {
|
||||
neighbor_offset = own_ypos - neighbor_ypos;
|
||||
}
|
||||
else {
|
||||
own_offset = neighbor_ypos - own_ypos;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
*(getNeighborPatch(NORTHEAST)->mDataZ);
|
||||
*(getNeighborPatch(NORTHEAST)->mDataZ +
|
||||
// <FS:CR> Aurora Sim
|
||||
(grids_per_edge + neighbor_offset - own_offset - 1) *
|
||||
getNeighborPatch(NORTHEAST)->getSurface()->getGridsPerEdge() );
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -614,8 +710,12 @@ void LLSurfacePatch::updateEastEdge()
|
|||
{
|
||||
U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge();
|
||||
U32 grids_per_edge = mSurfacep->getGridsPerEdge();
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 grids_per_edge_east = grids_per_edge;
|
||||
|
||||
U32 j, k;
|
||||
//U32 j, k;
|
||||
U32 j, k, h;
|
||||
// <FS:CR> Aurora Sim
|
||||
F32 *west_surface, *east_surface;
|
||||
|
||||
if (!getNeighborPatch(EAST))
|
||||
|
|
@ -627,6 +727,9 @@ void LLSurfacePatch::updateEastEdge()
|
|||
{
|
||||
west_surface = mDataZ + grids_per_patch_edge;
|
||||
east_surface = getNeighborPatch(EAST)->mDataZ;
|
||||
// <FS:CR> Aurora Sim
|
||||
grids_per_edge_east = getNeighborPatch(EAST)->getSurface()->getGridsPerEdge();
|
||||
// <FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -638,7 +741,11 @@ void LLSurfacePatch::updateEastEdge()
|
|||
for (j=0; j < grids_per_patch_edge; j++)
|
||||
{
|
||||
k = j * grids_per_edge;
|
||||
*(west_surface + k) = *(east_surface + k); // update buffer Z
|
||||
// <FS:CR> Aurora Sim
|
||||
h = j * grids_per_edge_east;
|
||||
*(west_surface + k) = *(east_surface + h); // update buffer Z
|
||||
//*(west_surface + k) = *(east_surface + k); // update buffer Z
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -667,13 +774,12 @@ void LLSurfacePatch::updateNorthEdge()
|
|||
}
|
||||
|
||||
// Update patchp's north edge ...
|
||||
for (i=0; i<grids_per_patch_edge; i++)
|
||||
for (i = 0; i<grids_per_patch_edge; i++)
|
||||
{
|
||||
*(south_surface + i) = *(north_surface + i); // update buffer Z
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOL LLSurfacePatch::updateTexture()
|
||||
{
|
||||
if (mSTexUpdate) // Update texture as needed
|
||||
|
|
|
|||
|
|
@ -136,7 +136,11 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, bool is_l
|
|||
{
|
||||
LLVector3 pos_agent = gAgent.getPositionAgent();
|
||||
F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent);
|
||||
F32 dist_near_chat = gAgent.getNearChatRadius();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 dist_near_chat = gAgent.getNearChatRadius();
|
||||
//if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > say_distance_squared)
|
||||
F32 dist_near_chat = LLWorld::getInstance()->getSayDistance();
|
||||
// </FS:CR> Aurora Sim
|
||||
if (distance_squared > dist_near_chat * dist_near_chat)
|
||||
{
|
||||
// diminish far-off chat
|
||||
|
|
@ -210,7 +214,10 @@ void LLViewerChat::getChatColor(const LLChat& chat, std::string& r_color_name, F
|
|||
{
|
||||
LLVector3 pos_agent = gAgent.getPositionAgent();
|
||||
F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent);
|
||||
F32 dist_near_chat = gAgent.getNearChatRadius();
|
||||
// <FS:CR> Aurora som
|
||||
//F32 dist_near_chat = gAgent.getNearChatRadius();
|
||||
F32 dist_near_chat = LLWorld::getInstance()->getSayDistance();
|
||||
// </FS:CR> Aurora sim
|
||||
if (distance_squared > dist_near_chat * dist_near_chat)
|
||||
{
|
||||
// diminish far-off chat
|
||||
|
|
|
|||
|
|
@ -179,6 +179,13 @@ void display_update_camera()
|
|||
{
|
||||
final_far *= 0.5f;
|
||||
}
|
||||
// <FS:CR> Aurora sim
|
||||
if(LLWorld::getInstance()->getLockedDrawDistance())
|
||||
{
|
||||
//Reset the draw distance and do not update with the new val
|
||||
final_far = LLViewerCamera::getInstance()->getFar();
|
||||
}
|
||||
// </FS:CR> Aurora sim
|
||||
LLViewerCamera::getInstance()->setFar(final_far);
|
||||
gViewerWindow->setup3DRender();
|
||||
|
||||
|
|
@ -348,7 +355,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
|
||||
LLImageGL::updateStats(gFrameTimeSeconds);
|
||||
|
||||
LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode");
|
||||
// <FS:CR> Aurora sim
|
||||
//LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode");
|
||||
S32 RenderName = gSavedSettings.getS32("AvatarNameTagMode");
|
||||
|
||||
if(RenderName > LLWorld::getInstance()->getAllowRenderName())//The most restricted gets set here
|
||||
RenderName = LLWorld::getInstance()->getAllowRenderName();
|
||||
LLVOAvatar::sRenderName = RenderName;
|
||||
// <FS:CR> Aurora sim
|
||||
|
||||
LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("NameTagShowGroupTitles") && gSavedSettings.getS32("AvatarNameTagMode"));
|
||||
|
||||
gPipeline.mBackfaceCull = TRUE;
|
||||
|
|
|
|||
|
|
@ -4602,7 +4602,21 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||
msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle);
|
||||
U32 teleport_flags;
|
||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
|
||||
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
|
||||
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y);
|
||||
|
||||
//and a little hack for Second Life compatibility
|
||||
if (region_size_y == 0 || region_size_x == 0)
|
||||
{
|
||||
region_size_x = 256;
|
||||
region_size_y = 256;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
std::string seedCap;
|
||||
msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap);
|
||||
|
|
@ -4622,7 +4636,10 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||
|
||||
// Viewer trusts the simulator.
|
||||
gMessageSystem->enableCircuit(sim_host, TRUE);
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// Ansariel: Disable teleport beacon after teleport
|
||||
if (gSavedSettings.getBOOL("FSDisableBeaconAfterTeleport"))
|
||||
|
|
@ -4946,9 +4963,26 @@ void process_crossed_region(LLMessageSystem* msg, void**)
|
|||
std::string seedCap;
|
||||
msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x);
|
||||
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y);
|
||||
|
||||
//and a little hack for Second Life compatibility
|
||||
if (region_size_y == 0 || region_size_x == 0)
|
||||
{
|
||||
region_size_x = 256;
|
||||
region_size_y = 256;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
send_complete_agent_movement(sim_host);
|
||||
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
regionp->setSeedCapability(seedCap);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -947,7 +947,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
U16 valswizzle[4];
|
||||
#endif
|
||||
U16 *val;
|
||||
const F32 size = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F32 size = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
const F32 size = mRegionp->getWidth();
|
||||
// </FS:CR> Aurora Sim
|
||||
const F32 MAX_HEIGHT = LLWorld::getInstance()->getRegionMaxHeight();
|
||||
const F32 MIN_HEIGHT = LLWorld::getInstance()->getRegionMinHeight();
|
||||
S32 length;
|
||||
|
|
|
|||
|
|
@ -134,7 +134,13 @@ LLViewerParcelMgr::LLViewerParcelMgr()
|
|||
mHoverParcel = new LLParcel();
|
||||
mCollisionParcel = new LLParcel();
|
||||
|
||||
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// <FS:CR> Aurora Sim
|
||||
// Max region size on Aurora-Sim, 8192, just creating larger buffers, it will still work on Second Life and Opensim
|
||||
F32 region_size = 8192.f;
|
||||
|
||||
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
|
||||
//mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// </FS:CR> Aurora Sim
|
||||
mHighlightSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
||||
resetSegments(mHighlightSegments);
|
||||
|
||||
|
|
@ -157,9 +163,19 @@ LLViewerParcelMgr::LLViewerParcelMgr()
|
|||
mAgentParcelOverlay[i] = 0;
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLViewerParcelMgr::init(F32 region_size)
|
||||
{
|
||||
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLViewerParcelMgr::~LLViewerParcelMgr()
|
||||
{
|
||||
|
|
@ -439,9 +455,15 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelInRectangle()
|
|||
void LLViewerParcelMgr::selectCollisionParcel()
|
||||
{
|
||||
// BUG: Claim to be in the agent's region
|
||||
mWestSouth = gAgent.getRegion()->getOriginGlobal();
|
||||
// <FS:CR> Aurora Sim
|
||||
//mWestSouth = gAgent.getRegion()->getOriginGlobal();
|
||||
//mEastNorth = mWestSouth;
|
||||
//mEastNorth += LLVector3d(PARCEL_GRID_STEP_METERS, PARCEL_GRID_STEP_METERS, 0.0);
|
||||
mWestSouth = getSelectionRegion()->getOriginGlobal();
|
||||
mEastNorth = mWestSouth;
|
||||
mEastNorth += LLVector3d(PARCEL_GRID_STEP_METERS, PARCEL_GRID_STEP_METERS, 0.0);
|
||||
mEastNorth += LLVector3d((getSelectionRegion()->getWidth() / REGION_WIDTH_METERS) * PARCEL_GRID_STEP_METERS,
|
||||
(getSelectionRegion()->getWidth() / REGION_WIDTH_METERS) * PARCEL_GRID_STEP_METERS, 0.0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// BUG: must be in the sim you are in
|
||||
LLMessageSystem *msg = gMessageSystem;
|
||||
|
|
@ -1392,8 +1414,11 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
|
|||
return;
|
||||
}
|
||||
|
||||
S32 parcels_per_edge = LLViewerParcelMgr::getInstance()->mParcelsPerEdge;
|
||||
S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 parcels_per_edge = LLViewerParcelMgr::getInstance()->mParcelsPerEdge;
|
||||
//S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
|
||||
S32 expected_size = 1024;
|
||||
// </FS:CR> Aurora Sim
|
||||
if (packed_overlay_size != expected_size)
|
||||
{
|
||||
llwarns << "Got parcel overlay size " << packed_overlay_size
|
||||
|
|
@ -1456,6 +1481,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
S32 other_clean_time = 0;
|
||||
|
||||
LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance();
|
||||
// <FS:CR> Aurora Sim
|
||||
LLViewerRegion* msg_region = LLWorld::getInstance()->getRegion( msg->getSender() );
|
||||
if(msg_region) {
|
||||
parcel_mgr.mParcelsPerEdge = S32( msg_region->getWidth() / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
else {
|
||||
parcel_mgr.mParcelsPerEdge = S32( gAgent.getRegion()->getWidth() / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result );
|
||||
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id );
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@ public:
|
|||
LLViewerParcelMgr();
|
||||
~LLViewerParcelMgr();
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void init(F32 region_size);
|
||||
// </FS:CR> Aurora Sim
|
||||
static void cleanupGlobals();
|
||||
|
||||
BOOL selectionEmpty() const;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ const U8 OVERLAY_IMG_COMPONENTS = 4;
|
|||
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
|
||||
: mRegion( region ),
|
||||
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
|
||||
// <FS:CR> Aurora Sim
|
||||
mRegionSize(S32(region_width_meters)),
|
||||
// </FS:CR> Aurora Sim
|
||||
mDirty( FALSE ),
|
||||
mTimeSinceLastUpdate(),
|
||||
mOverlayTextureIdx(-1),
|
||||
|
|
@ -409,7 +412,12 @@ void LLViewerParcelOverlay::uncompressLandOverlay(S32 chunk, U8 *packed_overlay)
|
|||
{
|
||||
// Unpack the message data into the ownership array
|
||||
S32 size = mParcelGridsPerEdge * mParcelGridsPerEdge;
|
||||
S32 chunk_size = size / PARCEL_OVERLAY_CHUNKS;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 chunk_size = size / PARCEL_OVERLAY_CHUNKS;
|
||||
S32 mParcelOverLayChunks = mRegionSize * mRegionSize / (128 * 128);
|
||||
S32 chunk_size = size / mParcelOverLayChunks;
|
||||
// <FS:CR> Aurora Sim
|
||||
|
||||
memcpy(mOwnership + chunk*chunk_size, packed_overlay, chunk_size); /*Flawfinder: ignore*/
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ private:
|
|||
LLViewerRegion* mRegion;
|
||||
|
||||
S32 mParcelGridsPerEdge;
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 mRegionSize;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLPointer<LLViewerTexture> mTexture;
|
||||
LLPointer<LLImageRaw> mImageRaw;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#include "llviewerparcelmgr.h" // <FS:CR> Aurora Sim
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(disable:4355)
|
||||
#endif
|
||||
|
|
@ -291,9 +293,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||
mCacheLoaded(FALSE),
|
||||
mCacheDirty(FALSE),
|
||||
mReleaseNotesRequested(FALSE),
|
||||
mCapabilitiesReceived(false)
|
||||
mCapabilitiesReceived(false),
|
||||
// <FS:CR> Aurora Sim
|
||||
mWidth(region_width_meters)
|
||||
{
|
||||
mWidth = region_width_meters;
|
||||
// Moved this up... -> mWidth = region_width_meters;
|
||||
// </FS:CR>
|
||||
mImpl->mOriginGlobal = from_region_handle(handle);
|
||||
updateRenderMatrix();
|
||||
|
||||
|
|
@ -303,7 +308,10 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||
mImpl->mCompositionp =
|
||||
new LLVLComposition(mImpl->mLandp,
|
||||
grids_per_region_edge,
|
||||
region_width_meters / grids_per_region_edge);
|
||||
// <FS:CR> Aurora Sim
|
||||
//region_width_meters / grids_per_region_edge);
|
||||
mWidth / grids_per_region_edge);
|
||||
// </FS:CR> Aurora Sim
|
||||
mImpl->mCompositionp->setSurface(mImpl->mLandp);
|
||||
|
||||
// Create the surfaces
|
||||
|
|
@ -313,7 +321,11 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||
mImpl->mOriginGlobal,
|
||||
mWidth);
|
||||
|
||||
mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
|
||||
// <FS:CR> Aurora Sim
|
||||
//mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
|
||||
mParcelOverlay = new LLViewerParcelOverlay(this, mWidth);
|
||||
LLViewerParcelMgr::getInstance()->init(mWidth);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
setOriginGlobal(from_region_handle(handle));
|
||||
calculateCenterGlobal();
|
||||
|
|
@ -471,6 +483,13 @@ void LLViewerRegion::setWaterHeight(F32 water_level)
|
|||
mImpl->mLandp->setWaterHeight(water_level);
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLViewerRegion::rebuildWater()
|
||||
{
|
||||
mImpl->mLandp->rebuildWater();
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
|
||||
F32 LLViewerRegion::getWaterHeight() const
|
||||
{
|
||||
return mImpl->mLandp->getWaterHeight();
|
||||
|
|
@ -763,11 +782,20 @@ LLVLComposition * LLViewerRegion::getComposition() const
|
|||
|
||||
F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
{
|
||||
if (x >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (x >= 256)
|
||||
if (x >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
if (y >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (y >= 256)
|
||||
if (y >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 256.f, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 256.f, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(mWidth, mWidth, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -776,8 +804,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
|||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled(255, 255);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, y - 256.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled(255, 255);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, y - 256.f);
|
||||
F32 our_comp = getComposition()->getValueScaled(mWidth-1.f, mWidth-1.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - regionp->getWidth(), y - regionp->getWidth());
|
||||
// </FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
|
|
@ -794,7 +826,10 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
|||
}
|
||||
else
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 0, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 0, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(mWidth, 0.f, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -803,8 +838,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
|||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled(255.f, (F32)y);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, (F32)y);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled(255.f, (F32)y);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, (F32)y);
|
||||
F32 our_comp = getComposition()->getValueScaled(mWidth-1.f, (F32)y);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - regionp->getWidth(), (F32)y);
|
||||
// </FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
|
|
@ -820,9 +859,15 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (y >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (y >= 256)
|
||||
else if (y >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(0.f, 256.f, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(0.f, 256.f, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(0.f, mWidth, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -831,8 +876,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
|||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled((F32)x, 255.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - 256.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled((F32)x, 255.f);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - 256.f);
|
||||
F32 our_comp = getComposition()->getValueScaled((F32)x, mWidth-1.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - regionp->getWidth());
|
||||
// <FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
|
|
@ -1182,7 +1231,6 @@ void LLViewerRegion::getInfo(LLSD& info)
|
|||
void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features)
|
||||
{
|
||||
sim_features = mSimulatorFeatures;
|
||||
|
||||
}
|
||||
|
||||
void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
|
||||
|
|
|
|||
|
|
@ -134,6 +134,9 @@ public:
|
|||
|
||||
void setWaterHeight(F32 water_level);
|
||||
F32 getWaterHeight() const;
|
||||
// <FS:CR> Aurora Sim
|
||||
void rebuildWater();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
BOOL isVoiceEnabled() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,10 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
|
|||
const F32 xyScaleInv = (1.f / xyScale);
|
||||
const F32 zScaleInv = (1.f / zScale);
|
||||
|
||||
const F32 inv_width = 1.f/mWidth;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F32 inv_width = 1.f/mWidth;
|
||||
const F32 inv_width = 1.f/(F32)mWidth;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// OK, for now, just have the composition value equal the height at the point.
|
||||
for (S32 j = y_begin; j < y_end; j++)
|
||||
|
|
|
|||
|
|
@ -50,18 +50,33 @@ LLVLManager::~LLVLManager()
|
|||
|
||||
void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
|
||||
{
|
||||
if (LAND_LAYER_CODE == vl_datap->mType)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (LAND_LAYER_CODE == vl_datap->mType)
|
||||
if (LAND_LAYER_CODE == vl_datap->mType || AURORA_LAND_LAYER_CODE == vl_datap->mType)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
mLandBits += mesg_size * 8;
|
||||
}
|
||||
else if (WIND_LAYER_CODE == vl_datap->mType)
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (WIND_LAYER_CODE == vl_datap->mType)
|
||||
else if (WIND_LAYER_CODE == vl_datap->mType || AURORA_WIND_LAYER_CODE == vl_datap->mType)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
mWindBits += mesg_size * 8;
|
||||
}
|
||||
else if (CLOUD_LAYER_CODE == vl_datap->mType)
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (CLOUD_LAYER_CODE == vl_datap->mType)
|
||||
else if (CLOUD_LAYER_CODE == vl_datap->mType || AURORA_CLOUD_LAYER_CODE == vl_datap->mType)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
mCloudBits += mesg_size * 8;
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
else if (WATER_LAYER_CODE == vl_datap->mType || AURORA_CLOUD_LAYER_CODE == vl_datap->mType)
|
||||
{
|
||||
mWaterBits += mesg_size * 8;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
else
|
||||
{
|
||||
llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
|
||||
|
|
@ -87,14 +102,28 @@ void LLVLManager::unpackData(const S32 num_packets)
|
|||
{
|
||||
datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, FALSE);
|
||||
}
|
||||
else if (WIND_LAYER_CODE == datap->mType)
|
||||
// <FS:CR> Aurora Sim
|
||||
else if (AURORA_LAND_LAYER_CODE == datap->mType)
|
||||
{
|
||||
datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, TRUE);
|
||||
}
|
||||
//else if (WIND_LAYER_CODE == datap->mType)
|
||||
else if (WIND_LAYER_CODE == datap->mType || AURORA_WIND_LAYER_CODE == datap->mType)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
datap->mRegionp->mWind.decompress(bit_pack, &goph);
|
||||
|
||||
}
|
||||
else if (CLOUD_LAYER_CODE == datap->mType)
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (CLOUD_LAYER_CODE == datap->mType)
|
||||
else if (CLOUD_LAYER_CODE == datap->mType || AURORA_CLOUD_LAYER_CODE == datap->mType)
|
||||
{
|
||||
|
||||
}
|
||||
else if (WATER_LAYER_CODE == datap->mType || AURORA_WATER_LAYER_CODE == datap->mType)
|
||||
{
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ protected:
|
|||
U32 mLandBits;
|
||||
U32 mWindBits;
|
||||
U32 mCloudBits;
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 mWaterBits;
|
||||
// </FS:CR> Aurora Sim
|
||||
};
|
||||
|
||||
class LLVLData
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@ LLVOWater::LLVOWater(const LLUUID &id,
|
|||
{
|
||||
// Terrain must draw during selection passes so it can block objects behind it.
|
||||
mbCanSelect = FALSE;
|
||||
setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
|
||||
// <FS:CR> Aurora Sim
|
||||
//setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
|
||||
setScale(LLVector3(mRegionp->getWidth(), mRegionp->getWidth(), 0.f));
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
mUseTexture = TRUE;
|
||||
mIsEdgePatch = FALSE;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
#include "v4color.h"
|
||||
#include "llworld.h"
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
#include "llviewerregion.h"
|
||||
#include "llagent.h"
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
|
|
@ -99,12 +104,18 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
|
|||
set_group_of_patch_header(group_headerp);
|
||||
|
||||
// X component
|
||||
decode_patch_header(bitpack, &patch_header);
|
||||
// <FS:CR> Aurora Sim
|
||||
//decode_patch_header(bitpack, &patch_header);
|
||||
decode_patch_header(bitpack, &patch_header, FALSE);
|
||||
// </FS:CR> Aurora Sim
|
||||
decode_patch(bitpack, buffer);
|
||||
decompress_patch(mVelX, buffer, &patch_header);
|
||||
|
||||
// Y component
|
||||
decode_patch_header(bitpack, &patch_header);
|
||||
// <FS:CR> Aurora Sim
|
||||
//decode_patch_header(bitpack, &patch_header);
|
||||
decode_patch_header(bitpack, &patch_header, FALSE);
|
||||
// </FS:CR> Aurora Sim
|
||||
decode_patch(bitpack, buffer);
|
||||
decompress_patch(mVelY, buffer, &patch_header);
|
||||
|
||||
|
|
@ -210,7 +221,10 @@ LLVector3 LLWind::getVelocity(const LLVector3 &pos_region)
|
|||
|
||||
LLVector3 pos_clamped_region(pos_region);
|
||||
|
||||
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
|
||||
F32 region_width_meters = gAgent.getRegion()->getWidth();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
if (pos_clamped_region.mV[VX] < 0.f)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@
|
|||
#include "pipeline.h"
|
||||
#include "llappviewer.h" // for do_disconnect()
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
#include "llfloatertools.h"
|
||||
#include "llfloaterreg.h"
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
#include <deque>
|
||||
#include <queue>
|
||||
#include <map>
|
||||
|
|
@ -74,13 +79,20 @@ const S32 MAX_NUMBER_OF_CLOUDS = 750;
|
|||
const S32 WORLD_PATCH_SIZE = 16;
|
||||
|
||||
extern LLColor4U MAX_WATER_COLOR;
|
||||
// <FS:CR> Aurora Sim
|
||||
extern std::string SYSTEM_FROM;
|
||||
|
||||
const U32 LLWorld::mWidth = 256;
|
||||
//const U32 LLWorld::mWidth = 256;
|
||||
U32 LLWorld::mWidth = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// meters/point, therefore mWidth * mScale = meters per edge
|
||||
const F32 LLWorld::mScale = 1.f;
|
||||
|
||||
const F32 LLWorld::mWidthInMeters = mWidth * mScale;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const F32 LLWorld::mWidthInMeters = mWidth * mScale;
|
||||
F32 LLWorld::mWidthInMeters = mWidth * mScale;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
//
|
||||
// Functions
|
||||
|
|
@ -111,6 +123,9 @@ LLWorld::LLWorld() :
|
|||
gGL.getTexUnit(0)->bind(mDefaultWaterTexturep);
|
||||
mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
|
||||
// <FS:CR> Aurora Sim>
|
||||
refreshLimits();
|
||||
// </FS:CR> Aurora Sim>
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -154,6 +169,38 @@ void LLWorld::refreshLimits()
|
|||
mRegionMaxPrimScaleNoMesh = OS_DEFAULT_MAX_PRIM_SCALE;// no restrictions here
|
||||
mRegionMaxHollowSize = OS_OBJECT_MAX_HOLLOW_SIZE;
|
||||
mRegionMinHoleSize = OS_OBJECT_MIN_HOLE_SIZE;
|
||||
// <FS:CR> Aurora Sim
|
||||
mMaxPhysPrimScale = OS_DEFAULT_MAX_PRIM_SCALE;
|
||||
mMaxLinkedPrims = 10000;
|
||||
mMaxPhysLinkedPrims = 10000;
|
||||
mMaxInventoryItemsTransfer = 42;
|
||||
mAllowRenderName = gSavedSettings.getS32("AvatarNameTagMode");
|
||||
mAllowMinimap = TRUE;
|
||||
mAllowPhysicalPrims = TRUE;
|
||||
mAllowRenderWater = TRUE;
|
||||
|
||||
mMaxPrimXPos = F32_MAX;
|
||||
mMaxPrimYPos = F32_MAX;
|
||||
mMaxPrimZPos = OS_MAX_OBJECT_Z;
|
||||
mMinPrimXPos = 0.f;
|
||||
mMinPrimYPos = 0.f;
|
||||
mMinPrimZPos = 0.f;
|
||||
mMaxDragDistance = gSavedSettings.getF32("MaxDragDistance");
|
||||
mClassicCloudsEnabled = FALSE;
|
||||
mAllowParcelWindLight = TRUE;
|
||||
mEnableTeenMode = FALSE; //get saved settings?
|
||||
mEnforceMaxBuild = FALSE;
|
||||
mLockedDrawDistance = FALSE;
|
||||
|
||||
mWhisperDistance = CHAT_WHISPER_RADIUS;
|
||||
mSayDistance = CHAT_NORMAL_RADIUS;
|
||||
mShoutDistance = CHAT_SHOUT_RADIUS;
|
||||
|
||||
mDrawDistance = -1.f;
|
||||
mTerrainDetailScale = -1.f;
|
||||
|
||||
SYSTEM_FROM = "Grid";
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
#endif // HAS_OPENSIM_SUPPORT // <FS:AW optional opensim support>
|
||||
|
|
@ -166,6 +213,38 @@ void LLWorld::refreshLimits()
|
|||
//llprimitive/llprimitive.*
|
||||
mRegionMaxHollowSize = SL_OBJECT_MAX_HOLLOW_SIZE;
|
||||
mRegionMinHoleSize = SL_OBJECT_MIN_HOLE_SIZE;
|
||||
// <FS:CR> Aurora Sim
|
||||
mMaxPhysPrimScale = SL_DEFAULT_MAX_PRIM_SCALE;
|
||||
mMaxLinkedPrims = MAX_CHILDREN_PER_TASK;
|
||||
mMaxPhysLinkedPrims = MAX_CHILDREN_PER_PHYSICAL_TASK;
|
||||
mMaxInventoryItemsTransfer = 42;
|
||||
mAllowRenderName = gSavedSettings.getS32("AvatarNameTagMode");
|
||||
mAllowMinimap = TRUE;
|
||||
mAllowPhysicalPrims = TRUE;
|
||||
mAllowRenderWater = TRUE;
|
||||
|
||||
mMaxPrimXPos = 256.f;
|
||||
mMaxPrimYPos = 256.f;
|
||||
mMaxPrimZPos = SL_MAX_OBJECT_Z;
|
||||
mMinPrimXPos = 0.f;
|
||||
mMinPrimYPos = 0.f;
|
||||
mMinPrimZPos = 0.f;
|
||||
mMaxDragDistance = gSavedSettings.getF32("MaxDragDistance");
|
||||
mClassicCloudsEnabled = FALSE;
|
||||
mAllowParcelWindLight = FALSE;
|
||||
mEnableTeenMode = FALSE; //get saved settings?
|
||||
mEnforceMaxBuild = FALSE;
|
||||
mLockedDrawDistance = FALSE;
|
||||
|
||||
mWhisperDistance = CHAT_WHISPER_RADIUS;
|
||||
mSayDistance = CHAT_NORMAL_RADIUS;
|
||||
mShoutDistance = CHAT_SHOUT_RADIUS;
|
||||
|
||||
mDrawDistance = -1.f;
|
||||
mTerrainDetailScale = -1.f;
|
||||
|
||||
SYSTEM_FROM = "Second Life";
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
LL_DEBUGS("OS_SETTINGS") << "RegionMaxHeight " << mRegionMaxHeight << llendl;
|
||||
LL_DEBUGS("OS_SETTINGS") << "RegionMinPrimScale " << mRegionMinPrimScale << llendl;
|
||||
|
|
@ -173,10 +252,301 @@ void LLWorld::refreshLimits()
|
|||
LL_DEBUGS("OS_SETTINGS") << "RegionMaxHollowSize " << mRegionMaxHollowSize << llendl;
|
||||
LL_DEBUGS("OS_SETTINGS") << "RegionMinHoleSize " << mRegionMinHoleSize << llendl;
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLWorld::setRegionMaxHeight(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMaxHeight = OS_MAX_OBJECT_Z;
|
||||
else
|
||||
mRegionMaxHeight = val;
|
||||
|
||||
setMaxPrimZPos(mRegionMaxHeight);
|
||||
}
|
||||
|
||||
void LLWorld::setRegionMinPrimScale(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMinPrimScale = OS_MIN_PRIM_SCALE;
|
||||
else
|
||||
mRegionMinPrimScale = val;
|
||||
}
|
||||
|
||||
void LLWorld::setRegionMaxPrimScale(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMaxPrimScale = OS_DEFAULT_MAX_PRIM_SCALE;
|
||||
else
|
||||
mRegionMaxPrimScale = val;
|
||||
}
|
||||
|
||||
void LLWorld::setRegionMaxPrimScaleNoMesh(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMaxPrimScaleNoMesh = OS_DEFAULT_MAX_PRIM_SCALE;
|
||||
else
|
||||
mRegionMaxPrimScaleNoMesh = val;
|
||||
}
|
||||
|
||||
void LLWorld::setRegionMaxHollowSize(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMaxHollowSize = OS_OBJECT_MAX_HOLLOW_SIZE;
|
||||
else
|
||||
mRegionMaxHollowSize = val;
|
||||
}
|
||||
|
||||
void LLWorld::setRegionMinHoleSize(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mRegionMinHoleSize = OS_OBJECT_MIN_HOLE_SIZE;
|
||||
else
|
||||
mRegionMinHoleSize = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxPhysPrimScale(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mMaxPhysPrimScale = mRegionMaxPrimScale;
|
||||
else
|
||||
mMaxPhysPrimScale = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxDragDistance(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mMaxDragDistance = gSavedSettings.getF32("MaxDragDistance");
|
||||
else
|
||||
mMaxDragDistance = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxLinkedPrims(S32 val)
|
||||
{
|
||||
if(val < 0)
|
||||
mMaxLinkedPrims = 10000;
|
||||
else
|
||||
mMaxLinkedPrims = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxPhysLinkedPrims(S32 val)
|
||||
{
|
||||
if(val < 0)
|
||||
mMaxPhysLinkedPrims = 10000;
|
||||
else
|
||||
mMaxPhysLinkedPrims = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxInventoryItemsTransfer(S32 val)
|
||||
{
|
||||
if(val < 0)
|
||||
mMaxInventoryItemsTransfer = 42;
|
||||
else
|
||||
mMaxInventoryItemsTransfer = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxPrimXPos(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mMaxPrimXPos = F32_MAX;
|
||||
else
|
||||
mMaxPrimXPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxPrimYPos(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mMaxPrimYPos = F32_MAX;
|
||||
else
|
||||
mMaxPrimYPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMaxPrimZPos(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mMaxPrimZPos = F32_MAX;
|
||||
else
|
||||
mMaxPrimZPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMinPrimXPos(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mMinPrimXPos = 0.0f;
|
||||
else
|
||||
mMinPrimXPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMinPrimYPos(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mMinPrimYPos = 0.0f;
|
||||
else
|
||||
mMinPrimYPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setMinPrimZPos(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mMinPrimZPos = 0.0f;
|
||||
else
|
||||
mMinPrimZPos = val;
|
||||
}
|
||||
|
||||
void LLWorld::setWhisperDistance(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mWhisperDistance = CHAT_WHISPER_RADIUS;
|
||||
else
|
||||
mWhisperDistance = val;
|
||||
}
|
||||
|
||||
void LLWorld::setSayDistance(F32 val)
|
||||
{
|
||||
if(val <= 0.0f)
|
||||
mSayDistance = CHAT_NORMAL_RADIUS;
|
||||
else
|
||||
mSayDistance = val;
|
||||
}
|
||||
|
||||
void LLWorld::setShoutDistance(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mShoutDistance = CHAT_SHOUT_RADIUS;
|
||||
else
|
||||
mShoutDistance = val;
|
||||
}
|
||||
|
||||
void LLWorld::setDrawDistance(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mDrawDistance = -1.f;
|
||||
else
|
||||
mDrawDistance = val;
|
||||
}
|
||||
|
||||
void LLWorld::setTerrainDetailScale(F32 val)
|
||||
{
|
||||
if(val < 0.0f)
|
||||
mTerrainDetailScale = -1.f;
|
||||
else
|
||||
mTerrainDetailScale = val;
|
||||
}
|
||||
|
||||
void LLWorld::setAllowMinimap(BOOL val) { mAllowMinimap = val; }
|
||||
void LLWorld::setAllowPhysicalPrims(BOOL val) { mAllowPhysicalPrims = val; }
|
||||
void LLWorld::setAllowRenderWater(BOOL val) { mAllowRenderWater = val; }
|
||||
void LLWorld::setSkyUseClassicClouds(BOOL val) { mClassicCloudsEnabled = val; }
|
||||
void LLWorld::setAllowParcelWindLight(BOOL val) { mAllowParcelWindLight = val; }
|
||||
void LLWorld::setEnableTeenMode(BOOL val) { mEnableTeenMode = val; }
|
||||
void LLWorld::setEnforceMaxBuild(BOOL val) { mEnforceMaxBuild = val; }
|
||||
void LLWorld::setLockedDrawDistance(BOOL val) { mLockedDrawDistance = val; }
|
||||
void LLWorld::setAllowRenderName(S32 val) { mAllowRenderName = val; }
|
||||
|
||||
void LLWorld::updateLimits()
|
||||
{
|
||||
if(!LLGridManager::getInstance())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
mRegionMaxHeight
|
||||
getRegionMinPrimScale
|
||||
getRegionMaxPrimScale
|
||||
getMinPrimXPos
|
||||
getMinPrimYPos
|
||||
getMinPrimZPos
|
||||
getMaxPrimXPos
|
||||
getMaxPrimYPos
|
||||
getMaxPrimZPos
|
||||
getRegionMaxHollowSize
|
||||
getRegionMinHoleSize
|
||||
getAllowPhysicalPrims
|
||||
mRegionMaxPrimScaleNoMesh // not implemented
|
||||
*/
|
||||
gFloaterTools->updateToolsSizeLimits();
|
||||
|
||||
/*
|
||||
mAllowMinimap
|
||||
*/
|
||||
if(mAllowMinimap && LLFloaterReg::instanceVisible("mini_map")) LLFloaterReg::showInstance("mini_map");
|
||||
else LLFloaterReg::hideInstance("mini_map");
|
||||
|
||||
/*
|
||||
mMaxLinkedPrims;
|
||||
mMaxPhysLinkedPrims; // not implemented
|
||||
*/
|
||||
//done in llselectmgr.cpp
|
||||
|
||||
/*
|
||||
mMaxDragDistance;
|
||||
*/
|
||||
//done in llmaniptranslate.cpp
|
||||
|
||||
/*
|
||||
mAllowRenderWater
|
||||
*/
|
||||
gAgent.getRegion()->rebuildWater();
|
||||
|
||||
/*
|
||||
mMaxInventoryItemsTransfer
|
||||
*/
|
||||
//done in llgiveinventory.cpp
|
||||
|
||||
/*
|
||||
drawdistance // set in kowopenregionssettings.cpp
|
||||
mLockedDrawDistance
|
||||
mAllowRenderName;
|
||||
*/
|
||||
//done in llviewerdisplay.cpp
|
||||
|
||||
/*
|
||||
skyUseClassicClouds
|
||||
*/
|
||||
//can't implement, classic clouds are removed from v3 viewers
|
||||
|
||||
/*
|
||||
mEnableTeenMode
|
||||
*/
|
||||
//this is enabletoggle, not set, done in llviewermenu.cpp
|
||||
|
||||
/*
|
||||
mMaxPhysPrimScale
|
||||
*/
|
||||
//todo
|
||||
|
||||
/*
|
||||
mEnforceMaxBuild
|
||||
*/
|
||||
// not used as long as there is no gSavedSettings.getBOOL("DisableMaxBuildConstraints") to overwrite default settings
|
||||
|
||||
/*
|
||||
mAllowParcelWindLight
|
||||
*/
|
||||
// not implemented setting
|
||||
|
||||
/*
|
||||
//Update the floater if its around
|
||||
LLPanelRegionOpenSettingsInfo* floater = LLFloaterRegionInfo::getPanelOpenSettings();
|
||||
|
||||
if (floater != NULL)
|
||||
{
|
||||
floater->refreshFromRegion(gAgent.getRegion());
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
// </opensim-limits>
|
||||
|
||||
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, const U32 ®ion_size_x, const U32 ®ion_size_y)
|
||||
{
|
||||
// <AW: opensim-limits>
|
||||
if(mLimitsNeedRefresh)
|
||||
{
|
||||
refreshLimits();
|
||||
}
|
||||
// </AW: opensim-limits>
|
||||
|
||||
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_REGIONS);
|
||||
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
|
||||
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
|
||||
|
|
@ -208,9 +578,17 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
|||
|
||||
U32 iindex = 0;
|
||||
U32 jindex = 0;
|
||||
// <FS:CR> Aurora Sim
|
||||
mWidth = region_size_x; //MegaRegion
|
||||
mWidthInMeters = mWidth * mScale; //MegaRegion
|
||||
// </FS:CR> Aurora Sim
|
||||
from_region_handle(region_handle, &iindex, &jindex);
|
||||
S32 x = (S32)(iindex/mWidth);
|
||||
S32 y = (S32)(jindex/mWidth);
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 x = (S32)(iindex/mWidth);
|
||||
//S32 y = (S32)(jindex/mWidth);
|
||||
S32 x = (S32)(iindex/256); //MegaRegion
|
||||
S32 y = (S32)(jindex/256); //MegaRegion
|
||||
// </FS:CR> Aurora Sim
|
||||
llinfos << "Adding new region (" << x << ":" << y << ")" << llendl;
|
||||
llinfos << "Host: " << host << llendl;
|
||||
|
||||
|
|
@ -245,21 +623,48 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
|||
F32 width = getRegionWidthInMeters();
|
||||
|
||||
LLViewerRegion *neighborp;
|
||||
// <FS:CR> Aurora Sim
|
||||
LLViewerRegion *last_neighborp;
|
||||
// </FS:CR> Aurora Sim
|
||||
from_region_handle(region_handle, ®ion_x, ®ion_y);
|
||||
|
||||
// Iterate through all directions, and connect neighbors if there.
|
||||
S32 dir;
|
||||
for (dir = 0; dir < 8; dir++)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
last_neighborp = NULL;
|
||||
// </FS:CR> Aurora Sim
|
||||
adj_x = region_x + width * gDirAxes[dir][0];
|
||||
adj_y = region_y + width * gDirAxes[dir][1];
|
||||
to_region_handle(adj_x, adj_y, &adj_handle);
|
||||
// <FS:CR> Aurora Sim
|
||||
//to_region_handle(adj_x, adj_y, &adj_handle);
|
||||
if(gDirAxes[dir][0] < 0) adj_x = region_x - WORLD_PATCH_SIZE;
|
||||
if(gDirAxes[dir][1] < 0) adj_y = region_y - WORLD_PATCH_SIZE;
|
||||
|
||||
neighborp = getRegionFromHandle(adj_handle);
|
||||
if (neighborp)
|
||||
for(S32 offset = 0; offset < width; offset += WORLD_PATCH_SIZE)
|
||||
{
|
||||
//llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl;
|
||||
regionp->connectNeighbor(neighborp, dir);
|
||||
to_region_handle(adj_x, adj_y, &adj_handle);
|
||||
neighborp = getRegionFromHandle(adj_handle);
|
||||
|
||||
if (neighborp && last_neighborp != neighborp)
|
||||
{
|
||||
//llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << " dir:" << dir << llendl;
|
||||
regionp->connectNeighbor(neighborp, dir);
|
||||
last_neighborp = neighborp;
|
||||
}
|
||||
|
||||
if(dir == NORTHEAST ||
|
||||
dir == NORTHWEST ||
|
||||
dir == SOUTHWEST ||
|
||||
dir == SOUTHEAST)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(dir == NORTH || dir == SOUTH) adj_x += WORLD_PATCH_SIZE;
|
||||
if(dir == EAST || dir == WEST) adj_y += WORLD_PATCH_SIZE;
|
||||
// <FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -437,11 +842,24 @@ LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVe
|
|||
|
||||
LLViewerRegion* LLWorld::getRegionFromHandle(const U64 &handle)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 x, y;
|
||||
from_region_handle(handle, &x, &y);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (region_list_t::iterator iter = mRegionList.begin();
|
||||
iter != mRegionList.end(); ++iter)
|
||||
{
|
||||
LLViewerRegion* regionp = *iter;
|
||||
if (regionp->getHandle() == handle)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (regionp->getHandle() == handle)
|
||||
U32 checkRegionX, checkRegionY;
|
||||
F32 checkRegionWidth = regionp->getWidth();
|
||||
from_region_handle(regionp->getHandle(), &checkRegionX, &checkRegionY);
|
||||
|
||||
if (x >= checkRegionX && x < (checkRegionX + checkRegionWidth) &&
|
||||
y >= checkRegionY && y < (checkRegionY + checkRegionWidth))
|
||||
// <FS:CR> Aurora Sim
|
||||
{
|
||||
return regionp;
|
||||
}
|
||||
|
|
@ -808,7 +1226,10 @@ F32 LLWorld::getLandFarClip() const
|
|||
|
||||
void LLWorld::setLandFarClip(const F32 far_clip)
|
||||
{
|
||||
static S32 const rwidth = (S32)REGION_WIDTH_U32;
|
||||
// <FS:CR> Aurora Sim
|
||||
//static S32 const rwidth = (S32)REGION_WIDTH_U32;
|
||||
static S32 const rwidth = (S32)getRegionWidthInMeters();
|
||||
// </FS:CR> Aurora Sim
|
||||
S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
|
||||
S32 const n2 = (llceil(far_clip) - 1) / rwidth;
|
||||
bool need_water_objects_update = n1 != n2;
|
||||
|
|
@ -854,18 +1275,27 @@ void LLWorld::updateWaterObjects()
|
|||
S32 max_y = 0;
|
||||
U32 region_x, region_y;
|
||||
|
||||
S32 rwidth = 256;
|
||||
// <FS:CR> Aurora Sim
|
||||
//Moved down below... -> S32 rwidth = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// We only want to fill in water for stuff that's near us, say, within 256 or 512m
|
||||
S32 range = LLViewerCamera::getInstance()->getFar() > 256.f ? 512 : 256;
|
||||
|
||||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
from_region_handle(regionp->getHandle(), ®ion_x, ®ion_y);
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 rwidth = (S32)regionp->getWidth();
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
min_x = (S32)region_x - range;
|
||||
min_y = (S32)region_y - range;
|
||||
max_x = (S32)region_x + range;
|
||||
max_y = (S32)region_y + range;
|
||||
// <FS:CR> Aurora Sim
|
||||
//max_x = (S32)region_x + range;
|
||||
//max_y = (S32)region_y + range;
|
||||
max_x = (S32)region_x + (rwidth-256) + range;
|
||||
max_y = (S32)region_y + (rwidth-256) + range;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
for (region_list_t::iterator iter = mRegionList.begin();
|
||||
iter != mRegionList.end(); ++iter)
|
||||
|
|
@ -1067,9 +1497,25 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
|
|||
// which simulator should we modify?
|
||||
LLHost sim(ip_u32, port);
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x);
|
||||
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y);
|
||||
|
||||
if (region_size_y == 0 || region_size_x == 0)
|
||||
{
|
||||
region_size_x = 256;
|
||||
region_size_y = 256;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
// Viewer trusts the simulator.
|
||||
msg->enableCircuit(sim, TRUE);
|
||||
LLWorld::getInstance()->addRegion(handle, sim);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLWorld::getInstance()->addRegion(handle, sim);
|
||||
LLWorld::getInstance()->addRegion(handle, sim, region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// give the simulator a message it can use to get ip and port
|
||||
llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@ public:
|
|||
void destroyClass();
|
||||
|
||||
void refreshLimits();// <AW: opensim-limits>
|
||||
LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host);
|
||||
// <FS:CR> Aurora Sim
|
||||
void updateLimits(); // <FS:CR> Aurora Sim
|
||||
//LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host);
|
||||
LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host, const U32 ®ion_size_x, const U32 ®ion_size_y);
|
||||
// <FS:CR> Aurora Sim
|
||||
// safe to call if already present, does the "right thing" if
|
||||
// hosts are same, or if hosts are different, etc...
|
||||
void removeRegion(const LLHost &host);
|
||||
|
|
@ -124,6 +128,73 @@ public:
|
|||
F32 getRegionMaxPrimScaleNoMesh() const { return mRegionMaxPrimScaleNoMesh; }
|
||||
F32 getRegionMaxHollowSize() const { return mRegionMaxHollowSize; }
|
||||
F32 getRegionMinHoleSize() const { return mRegionMinHoleSize; }
|
||||
// <FS:CR> Aurora Sim
|
||||
int getMaxLinkedPrims() const { return mMaxLinkedPrims; }
|
||||
int getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; }
|
||||
int getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; }
|
||||
int getAllowRenderName() const { return mAllowRenderName; }
|
||||
bool getAllowMinimap() const { return mAllowMinimap; }
|
||||
bool getAllowPhysicalPrims() const { return mAllowPhysicalPrims; }
|
||||
bool getAllowRenderWater() const { return mAllowRenderWater; }
|
||||
|
||||
F32 getMaxPrimXPos() const { return mMaxPrimXPos; }
|
||||
F32 getMaxPrimYPos() const { return mMaxPrimYPos; }
|
||||
F32 getMaxPrimZPos() const { return mMaxPrimZPos; }
|
||||
F32 getMinPrimXPos() const { return mMinPrimXPos; }
|
||||
F32 getMinPrimYPos() const { return mMinPrimYPos; }
|
||||
F32 getMinPrimZPos() const { return mMinPrimZPos; }
|
||||
F32 getMaxDragDistance() const { return mMaxDragDistance; }
|
||||
F32 getMaxPhysPrimScale() const { return mMaxPhysPrimScale; }
|
||||
BOOL getSkyUseClassicClouds() const { return mClassicCloudsEnabled; }
|
||||
BOOL getAllowParcelWindLight() const{ return mAllowParcelWindLight; }
|
||||
BOOL getEnableTeenMode() const { return mEnableTeenMode; }
|
||||
BOOL getEnforceMaxBuild() const { return mEnforceMaxBuild; }
|
||||
BOOL getLockedDrawDistance() const { return mLockedDrawDistance; }
|
||||
|
||||
F32 getWhisperDistance() const { return mWhisperDistance; }
|
||||
F32 getSayDistance() const { return mSayDistance; }
|
||||
F32 getShoutDistance() const { return mShoutDistance; }
|
||||
|
||||
F32 getDrawDistance() const { return mDrawDistance; }
|
||||
F32 getTerrainDetailScale() const { return mTerrainDetailScale; }
|
||||
|
||||
//setters
|
||||
void setRegionMaxHeight(F32 val);
|
||||
void setRegionMinPrimScale(F32 val);
|
||||
void setRegionMaxPrimScale(F32 val);
|
||||
void setRegionMaxPrimScaleNoMesh(F32 val);
|
||||
void setRegionMaxHollowSize(F32 val);
|
||||
void setRegionMinHoleSize(F32 val);
|
||||
|
||||
void setMaxLinkedPrims(S32 val);
|
||||
void setMaxPhysLinkedPrims(S32 val);
|
||||
void setMaxInventoryItemsTransfer(S32 val);
|
||||
void setAllowRenderName(S32 val);
|
||||
void setAllowMinimap(BOOL val);
|
||||
void setAllowPhysicalPrims(BOOL val);
|
||||
void setAllowRenderWater(BOOL val);
|
||||
|
||||
void setMaxPrimXPos(F32 val);
|
||||
void setMaxPrimYPos(F32 val);
|
||||
void setMaxPrimZPos(F32 val);
|
||||
void setMinPrimXPos(F32 val);
|
||||
void setMinPrimYPos(F32 val);
|
||||
void setMinPrimZPos(F32 val);
|
||||
void setMaxDragDistance(F32 val);
|
||||
void setMaxPhysPrimScale(F32 val);
|
||||
void setSkyUseClassicClouds(BOOL val);
|
||||
void setAllowParcelWindLight(BOOL val);
|
||||
void setEnableTeenMode(BOOL val);
|
||||
void setEnforceMaxBuild(BOOL val);
|
||||
void setLockedDrawDistance(BOOL val);
|
||||
|
||||
void setWhisperDistance(F32 val);
|
||||
void setSayDistance(F32 val);
|
||||
void setShoutDistance(F32 val);
|
||||
|
||||
void setDrawDistance(F32 val);
|
||||
void setTerrainDetailScale(F32 val);
|
||||
// <FS:CR> Aurora Sim
|
||||
// </AW: opensim-limits>
|
||||
void updateRegions(F32 max_update_time);
|
||||
void updateVisibilities();
|
||||
|
|
@ -179,12 +250,18 @@ private:
|
|||
region_list_t mCulledRegionList;
|
||||
|
||||
// Number of points on edge
|
||||
static const U32 mWidth;
|
||||
// <FS:CR> Aurora Sim
|
||||
//static const U32 mWidth;
|
||||
static U32 mWidth;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// meters/point, therefore mWidth * mScale = meters per edge
|
||||
static const F32 mScale;
|
||||
|
||||
static const F32 mWidthInMeters;
|
||||
// <FS:CR> Aurora Sim
|
||||
//static const F32 mWidthInMeters;
|
||||
static F32 mWidthInMeters;
|
||||
// </FS:CR> Aurora Sim
|
||||
// <AW: opensim-limits>
|
||||
F32 mRegionMaxHeight;
|
||||
F32 mRegionMinPrimScale;
|
||||
|
|
@ -192,6 +269,35 @@ private:
|
|||
F32 mRegionMaxPrimScaleNoMesh;
|
||||
F32 mRegionMaxHollowSize;
|
||||
F32 mRegionMinHoleSize;
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 mMaxLinkedPrims;
|
||||
S32 mMaxPhysLinkedPrims;
|
||||
S32 mMaxInventoryItemsTransfer;
|
||||
S32 mAllowRenderName;
|
||||
BOOL mAllowMinimap;
|
||||
BOOL mAllowPhysicalPrims;
|
||||
BOOL mAllowRenderWater;
|
||||
|
||||
F32 mMaxPrimXPos;
|
||||
F32 mMaxPrimYPos;
|
||||
F32 mMaxPrimZPos;
|
||||
F32 mMinPrimXPos;
|
||||
F32 mMinPrimYPos;
|
||||
F32 mMinPrimZPos;
|
||||
F32 mMaxDragDistance;
|
||||
F32 mMaxPhysPrimScale;
|
||||
BOOL mAllowParcelWindLight;
|
||||
BOOL mEnableTeenMode;
|
||||
BOOL mEnforceMaxBuild;
|
||||
BOOL mLockedDrawDistance;
|
||||
|
||||
F32 mWhisperDistance;
|
||||
F32 mSayDistance;
|
||||
F32 mShoutDistance;
|
||||
|
||||
F32 mDrawDistance;
|
||||
F32 mTerrainDetailScale;
|
||||
// <FS:CR> Aurora Sim
|
||||
bool mLimitsNeedRefresh;
|
||||
// </AW: opensim-limits>
|
||||
F32 mLandFarClip; // Far clip distance for land.
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
#include "llviewertexturelist.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
#ifdef HAS_OPENSIM_SUPPORT
|
||||
#include "llviewernetwork.h"
|
||||
#include "llappviewer.h"
|
||||
#include "lltexturecache.h"
|
||||
#endif //HAS_OPENSIM_SUPPORT
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// Timers to temporise database requests
|
||||
const F32 AGENTS_UPDATE_TIMER = 60.0; // Seconds between 2 agent requests for a region
|
||||
const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // Seconds before we consider re-requesting item data for the grid
|
||||
|
|
@ -66,19 +74,38 @@ LLSimInfo::LLSimInfo(U64 handle)
|
|||
mAgentsUpdateTime(0),
|
||||
mAccess(0x0),
|
||||
mRegionFlags(0x0),
|
||||
mFirstAgentRequest(true)
|
||||
mFirstAgentRequest(true),
|
||||
// <FS:CR> Aurora Sim
|
||||
mSizeX(REGION_WIDTH_UNITS),
|
||||
mSizeY(REGION_WIDTH_UNITS)
|
||||
// </FS:CR> Aurora Sim
|
||||
// mWaterHeight(0.f)
|
||||
{
|
||||
}
|
||||
|
||||
void LLSimInfo::setLandForSaleImage (LLUUID image_id)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
if (mMapImageID.isNull() && image_id.notNull()) {
|
||||
mOverlayImage = LLViewerTextureManager::findFetchedTexture(image_id);
|
||||
if(mOverlayImage.notNull()) {
|
||||
//mOverlayImage->destroyRawImage();
|
||||
//mOverlayImage->destroySavedRawImage();
|
||||
//mOverlayImage->destroyGLTexture();
|
||||
//mOverlayImage->destroyTexture();
|
||||
LLAppViewer::getTextureCache()->removeFromCache(image_id);
|
||||
}
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
mMapImageID = image_id;
|
||||
|
||||
// Fetch the image
|
||||
if (mMapImageID.notNull())
|
||||
{
|
||||
mOverlayImage = LLViewerTextureManager::getFetchedTexture(mMapImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
|
||||
// <FS:CR> Aurora Sim
|
||||
mOverlayImage->forceImmediateUpdate();
|
||||
// </FS:CR> Aurora Sim
|
||||
mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
}
|
||||
else
|
||||
|
|
@ -324,11 +351,32 @@ LLSimInfo* LLWorldMap::simInfoFromPosGlobal(const LLVector3d& pos_global)
|
|||
|
||||
LLSimInfo* LLWorldMap::simInfoFromHandle(const U64 handle)
|
||||
{
|
||||
sim_info_map_t::iterator it = mSimInfoMap.find(handle);
|
||||
if (it != mSimInfoMap.end())
|
||||
// <FS:CR> Aurora Sim
|
||||
//sim_info_map_t::iterator it = mSimInfoMap.find(handle);
|
||||
//if (it != mSimInfoMap.end())
|
||||
//{
|
||||
//return it->second;
|
||||
std::map<U64, LLSimInfo*>::const_iterator it;
|
||||
for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it)
|
||||
{
|
||||
return it->second;
|
||||
const U64 hndl = (*it).first;
|
||||
LLSimInfo* info = (*it).second;
|
||||
if(hndl == handle)
|
||||
{
|
||||
return info;
|
||||
}
|
||||
U32 x = 0, y = 0;
|
||||
from_region_handle(handle, &x, &y);
|
||||
U32 checkRegionX, checkRegionY;
|
||||
from_region_handle(hndl, &checkRegionX, &checkRegionY);
|
||||
|
||||
if(x >= checkRegionX && x < (checkRegionX + info->mSizeX) &&
|
||||
y >= checkRegionY && y < (checkRegionY + info->mSizeY))
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -391,7 +439,10 @@ void LLWorldMap::reloadItems(bool force)
|
|||
// static public
|
||||
// Insert a region in the region map
|
||||
// returns true if region inserted, false otherwise
|
||||
bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& image_id, U32 accesscode, U32 region_flags)
|
||||
// <FS:CR> Aurora Sim
|
||||
//bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& image_id, U32 accesscode, U32 region_flags)
|
||||
bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, U16 x_size, U16 y_size, std::string& name, LLUUID& image_id, U32 accesscode, U32 region_flags)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// This region doesn't exist
|
||||
if (accesscode == 255)
|
||||
|
|
@ -420,6 +471,9 @@ bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUI
|
|||
siminfo->setRegionFlags(region_flags);
|
||||
// siminfo->setWaterHeight((F32) water_height);
|
||||
siminfo->setLandForSaleImage(image_id);
|
||||
// <FS:CR> Aurora Sim
|
||||
siminfo->setSize(x_size, y_size);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// Handle the location tracking (for teleport, UI feedback and info display)
|
||||
if (LLWorldMap::getInstance()->isTrackingInRectangle( x_world, y_world, x_world + REGION_WIDTH_UNITS, y_world + REGION_WIDTH_UNITS))
|
||||
|
|
|
|||
|
|
@ -101,6 +101,10 @@ public:
|
|||
|
||||
// Setters
|
||||
void setName(std::string& name) { mName = name; }
|
||||
// <FS:CR> Aurora Sim
|
||||
void setSize(U16 sizeX, U16 sizeY) { mSizeX = sizeX; mSizeY = sizeY; }
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
void setAccess (U32 accesscode) { mAccess = accesscode; }
|
||||
void setRegionFlags (U32 region_flags) { mRegionFlags = region_flags; }
|
||||
void setLandForSaleImage (LLUUID image_id);
|
||||
|
|
@ -147,8 +151,17 @@ public:
|
|||
|
||||
const U64 &getHandle() const { return mHandle; }
|
||||
|
||||
private:
|
||||
// <FS:CR> Aurora Sim
|
||||
const U16 getSizeX() const { return mSizeX; }
|
||||
const U16 getSizeY() const { return mSizeY; }
|
||||
|
||||
public: // private:
|
||||
|
||||
U64 mHandle; // This is a hash of the X and Y world coordinates of the SW corner of the sim
|
||||
U16 mSizeX;
|
||||
U16 mSizeY;
|
||||
private:
|
||||
// <FS:CR> Aurora Sim
|
||||
std::string mName; // Region name
|
||||
|
||||
F64 mAgentsUpdateTime; // Time stamp giving the last time the agents information was requested for that region
|
||||
|
|
@ -177,8 +190,12 @@ private:
|
|||
|
||||
// We request region data on the world by "blocks" of (MAP_BLOCK_SIZE x MAP_BLOCK_SIZE) regions
|
||||
// This is to reduce the number of requests to the asset DB and get things in big "blocks"
|
||||
const S32 MAP_MAX_SIZE = 2048;
|
||||
const S32 MAP_BLOCK_SIZE = 4;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const S32 MAP_MAX_SIZE = 2048;
|
||||
//const S32 MAP_BLOCK_SIZE = 4;
|
||||
const S32 MAP_MAX_SIZE = 16384;
|
||||
const S32 MAP_BLOCK_SIZE = 16;
|
||||
// <FS:CR> Aurora Sim
|
||||
const S32 MAP_BLOCK_RES = (MAP_MAX_SIZE / MAP_BLOCK_SIZE);
|
||||
|
||||
class LLWorldMap : public LLSingleton<LLWorldMap>
|
||||
|
|
@ -201,7 +218,10 @@ public:
|
|||
|
||||
// Insert a region and items in the map global instance
|
||||
// Note: x_world and y_world in world coordinates (meters)
|
||||
static bool insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 accesscode, U32 region_flags);
|
||||
// <FS:CR> Aurora Sim
|
||||
//static bool insertRegion(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 accesscode, U32 region_flags);
|
||||
static bool insertRegion(U32 x_world, U32 y_world, U16 x_size, U16 y_size, std::string& name, LLUUID& uuid, U32 accesscode, U32 region_flags);
|
||||
// </FS:CR> Aurora Sim
|
||||
static bool insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID& uuid, U32 type, S32 extra, S32 extra2);
|
||||
|
||||
// Get info on sims (region) : note that those methods only search the range of loaded sims (the one that are being browsed)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@
|
|||
#include "llagent.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
#ifdef HAS_OPENSIM_SUPPORT
|
||||
#include "llviewernetwork.h"
|
||||
#endif //HAS_OPENSIM_SUPPORT
|
||||
// <FS:CR> Aurora Sim
|
||||
|
||||
const U32 LAYER_FLAG = 2;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -128,6 +134,12 @@ void LLWorldMapMessage::sendHandleRegionRequest(U64 region_handle,
|
|||
|
||||
void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
#ifdef HAS_OPENSIM_SUPPORT
|
||||
if(LLGridManager::getInstance()->isInOpenSim()) return_nonexistent = true;
|
||||
#endif
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
//LL_INFOS("World Map") << "LLWorldMap::sendMapBlockRequest()" << ", min = (" << min_x << ", " << min_y << "), max = (" << max_x << ", " << max_y << "), nonexistent = " << return_nonexistent << LL_ENDL;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_MapBlockRequest);
|
||||
|
|
@ -169,6 +181,10 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
|
|||
{
|
||||
U16 x_regions;
|
||||
U16 y_regions;
|
||||
// <FS:CR> Aurora Sim
|
||||
U16 x_size = 256;
|
||||
U16 y_size = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
std::string name;
|
||||
U8 accesscode;
|
||||
U32 region_flags;
|
||||
|
|
@ -183,6 +199,18 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
|
|||
// msg->getU8Fast(_PREHASH_Data, _PREHASH_WaterHeight, water_height, block);
|
||||
// msg->getU8Fast(_PREHASH_Data, _PREHASH_Agents, agents, block);
|
||||
msg->getUUIDFast(_PREHASH_Data, _PREHASH_MapImageID, image_id, block);
|
||||
// <FS:CR> Aurora Sim
|
||||
if(msg->getNumberOfBlocksFast(_PREHASH_Size) > 0)
|
||||
{
|
||||
msg->getU16Fast(_PREHASH_Size, _PREHASH_SizeX, x_size, block);
|
||||
msg->getU16Fast(_PREHASH_Size, _PREHASH_SizeY, y_size, block);
|
||||
}
|
||||
if(x_size == 0 || (x_size % 16) != 0|| (y_size % 16) != 0)
|
||||
{
|
||||
x_size = 256;
|
||||
y_size = 256;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS;
|
||||
U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS;
|
||||
|
|
@ -197,7 +225,19 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
|
|||
}
|
||||
// </AW: opensim>
|
||||
// Insert that region in the world map, if failure, flag it as a "null_sim"
|
||||
if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
|
||||
if(msg->getNumberOfBlocksFast(_PREHASH_Size) > 0)
|
||||
{
|
||||
msg->getU16Fast(_PREHASH_Size, _PREHASH_SizeX, x_size, block);
|
||||
msg->getU16Fast(_PREHASH_Size, _PREHASH_SizeY, y_size, block);
|
||||
}
|
||||
if(x_size == 0 || (x_size % 16) != 0|| (y_size % 16) != 0)
|
||||
{
|
||||
x_size = 256;
|
||||
y_size = 256;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
found_null_sim = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
#include "llviewernetwork.h" // <FS:CR> Aurora Sim
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
||||
|
|
@ -354,6 +355,7 @@ void LLWorldMapView::draw()
|
|||
|
||||
// Draw the image tiles
|
||||
drawMipmap(width, height);
|
||||
|
||||
gGL.flush();
|
||||
|
||||
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
|
||||
|
|
@ -377,8 +379,12 @@ void LLWorldMapView::draw()
|
|||
// When the view isn't panned, 0,0 = center of rectangle
|
||||
F32 bottom = sPanY + half_height + relative_y;
|
||||
F32 left = sPanX + half_width + relative_x;
|
||||
F32 top = bottom + sMapScale ;
|
||||
F32 right = left + sMapScale ;
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 top = bottom + sMapScale ;
|
||||
//F32 right = left + sMapScale ;
|
||||
F32 top = bottom+ (sMapScale * (info->mSizeY / REGION_WIDTH_METERS));
|
||||
F32 right = left + (sMapScale * (info->mSizeX / REGION_WIDTH_METERS));
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// Discard if region is outside the screen rectangle (not visible on screen)
|
||||
if ((top < 0.f) || (bottom > height) ||
|
||||
|
|
@ -439,8 +445,16 @@ void LLWorldMapView::draw()
|
|||
if (overlayimage)
|
||||
{
|
||||
// Inform the fetch mechanism of the size we need
|
||||
S32 draw_size = llround(sMapScale);
|
||||
overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 draw_size = llround(sMapScale);
|
||||
//overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
|
||||
S32 x_draw_size = llround(sMapScale);
|
||||
S32 y_draw_size = llround(sMapScale);
|
||||
x_draw_size *= (info->mSizeX / REGION_WIDTH_METERS);
|
||||
y_draw_size *= (info->mSizeY / REGION_WIDTH_METERS);
|
||||
|
||||
overlayimage->setKnownDrawSize(llround(x_draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(y_draw_size * LLUI::sGLScaleFactor.mV[VY]));
|
||||
// </FS:CR> Aurora Sim
|
||||
// Draw something whenever we have enough info
|
||||
if (overlayimage->hasGLTexture())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ Additional code generously contributed to Firestorm by:
|
|||
top_pad="10"
|
||||
width="435"
|
||||
word_wrap="true">
|
||||
Albatroz Hird, Alexie Birman, Andromeda Rage, Armin Weatherwax, Chalice Yao, Damian Zhaoying, Dawa Gurbux, f0rbidden, Fractured Crystal, Hitomi Tiponi, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, MartinRJ Fayray, Melancholy Lemon, Miguael Liamano, Mimika Oh, Mister Acacia, Mysty Saunders, Nagi Michinaga, nhede Core, NiranV Dean, Nogardrevlis Lectar, paperwork, Peyton Menges, programmtest, Qwerty Venom, Sahkolihaa Contepomi, Satomi Ahn, Shin Wasp, Shyotl Kuhr, Sione Lomu, Sunset Faulkes, Thickbrick Sleaford, Vaalith Jinn, Whirly Fizzle, Zwagoth Klaar and others.
|
||||
Albatroz Hird, Alexie Birman, Andromeda Rage, Armin Weatherwax, Chalice Yao, Damian Zhaoying, Dawa Gurbux, f0rbidden, Fractured Crystal, Hitomi Tiponi, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, MartinRJ Fayray, Melancholy Lemon, Miguael Liamano, Mimika Oh, Mister Acacia, Mysty Saunders, Nagi Michinaga, nhede Core, NiranV Dean, Nogardrevlis Lectar, paperwork, Peyton Menges, programmtest, Qwerty Venom, Revolution Smythe, Sahkolihaa Contepomi, Satomi Ahn, Shin Wasp, Shyotl Kuhr, Sione Lomu, Sunset Faulkes, Thickbrick Sleaford, Vaalith Jinn, Whirly Fizzle, Zwagoth Klaar and others.
|
||||
</text_editor>
|
||||
|
||||
<text
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_x"
|
||||
width="44" >
|
||||
|
|
@ -644,7 +644,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_y"
|
||||
width="44">
|
||||
|
|
@ -660,7 +660,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="5000"
|
||||
max_val="10000"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_z"
|
||||
right="-9">
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_x"
|
||||
width="44" >
|
||||
|
|
@ -644,7 +644,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_y"
|
||||
width="44">
|
||||
|
|
@ -660,7 +660,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="5000"
|
||||
max_val="10000"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_z"
|
||||
right="-9">
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_x"
|
||||
width="44" >
|
||||
|
|
@ -648,7 +648,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="255"
|
||||
max_val="8191"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_y"
|
||||
width="44">
|
||||
|
|
@ -664,7 +664,7 @@
|
|||
initial_value="128"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
max_val="5000"
|
||||
max_val="10000"
|
||||
min_val="0"
|
||||
name="teleport_coordinate_z"
|
||||
right="-9">
|
||||
|
|
|
|||
Loading…
Reference in New Issue