AuroraSim: More tiny bits to help life be normal on the grid.

This commit is contained in:
Lirusaito
2013-01-20 23:22:53 -05:00
parent fa8e1f033b
commit 36e6946c96
6 changed files with 18 additions and 7 deletions

View File

@@ -287,7 +287,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
avatar_movement_dir.normalize(); avatar_movement_dir.normalize();
// planted foot speed is avatar velocity - foot slip amount along avatar movement direction // planted foot speed is avatar velocity - foot slip amount along avatar movement direction
F32 foot_speed = speed - ((foot_slip_vector * avatar_movement_dir) / delta_time); F32 foot_speed = llmax(0.f, speed - ((foot_slip_vector * avatar_movement_dir) / delta_time));
// multiply animation playback rate so that foot speed matches avatar speed // multiply animation playback rate so that foot speed matches avatar speed
F32 min_speed_multiplier = clamp_rescale(speed, 0.f, 1.f, 0.f, 0.1f); F32 min_speed_multiplier = clamp_rescale(speed, 0.f, 1.f, 0.f, 0.1f);

View File

@@ -645,8 +645,10 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
} }
std::string sim_name = sim_info->getName(); std::string sim_name = sim_info->getName();
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); U32 locX, locY;
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); from_region_handle(sim_info->getHandle(), &locX, &locY);
F32 region_x = pos_global.mdV[VX] - locX;
F32 region_y = pos_global.mdV[VY] - locY;
std::string full_name = llformat("%s (%d, %d, %d)", std::string full_name = llformat("%s (%d, %d, %d)",
// sim_name.c_str(), // sim_name.c_str(),
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-04 (RLVa-1.0.0a) // [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-04 (RLVa-1.0.0a)

View File

@@ -539,6 +539,7 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos, BOOL rotated)
LLVector3 pos_local; LLVector3 pos_local;
pos_local.setVec(relative_pos_global); // convert to floats from doubles pos_local.setVec(relative_pos_global); // convert to floats from doubles
mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
pos_local.mV[VX] *= mPixelsPerMeter; pos_local.mV[VX] *= mPixelsPerMeter;
pos_local.mV[VY] *= mPixelsPerMeter; pos_local.mV[VY] *= mPixelsPerMeter;
// leave Z component in meters // leave Z component in meters

View File

@@ -2656,8 +2656,9 @@ void LLPanelObject::onPastePosClip(void* user_data)
std::string stringVec = wstring_to_utf8str(temp_string); std::string stringVec = wstring_to_utf8str(temp_string);
if(!getvectorfromclip(stringVec, &mClipboardPos)) return; if(!getvectorfromclip(stringVec, &mClipboardPos)) return;
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, 256.f); float region_width = gAgent.getRegion()->getWidth();
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, 256.f); mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, region_width);
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, region_width);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f); mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f);
self->mCtrlPosX->set( mClipboardPos.mV[VX] ); self->mCtrlPosX->set( mClipboardPos.mV[VX] );

View File

@@ -43,6 +43,7 @@
#include "llmapresponders.h" #include "llmapresponders.h"
#include "llviewercontrol.h" #include "llviewercontrol.h"
#include "llfloaterworldmap.h" #include "llfloaterworldmap.h"
#include "lltexturecache.h"
#include "lltracker.h" #include "lltracker.h"
#include "llviewertexturelist.h" #include "llviewertexturelist.h"
#include "llviewerregion.h" #include "llviewerregion.h"
@@ -91,12 +92,17 @@ LLSimInfo::LLSimInfo(U64 handle)
void LLSimInfo::setLandForSaleImage (LLUUID image_id) void LLSimInfo::setLandForSaleImage (LLUUID image_id)
{ {
const bool is_aurora = gHippoGridManager->getConnectedGrid()->isAurora();
if (is_aurora && mMapImageID[SIM_LAYER_OVERLAY].isNull() && image_id.notNull() && gTextureList.findImage(image_id))
LLAppViewer::getTextureCache()->removeFromCache(image_id);
mMapImageID[SIM_LAYER_OVERLAY] = image_id; mMapImageID[SIM_LAYER_OVERLAY] = image_id;
// Fetch the image // Fetch the image
if (mMapImageID[SIM_LAYER_OVERLAY].notNull()) if (mMapImageID[SIM_LAYER_OVERLAY].notNull())
{ {
mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
if (is_aurora) mLayerImage[SIM_LAYER_OVERLAY]->forceImmediateUpdate();
mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP); mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP);
} }
else else
@@ -526,8 +532,8 @@ void LLWorldMap::processMapLayerReply(LLMessageSystem* msg, void**)
bool LLWorldMap::useWebMapTiles() bool LLWorldMap::useWebMapTiles()
{ {
static const LLCachedControl<bool> use_web_map_tiles("UseWebMapTiles",false); static const LLCachedControl<bool> use_web_map_tiles("UseWebMapTiles",false);
return use_web_map_tiles && return use_web_map_tiles && !gHippoGridManager->getConnectedGrid()->isAurora() &&
(( gHippoGridManager->getConnectedGrid()->isSecondLife() || sGotMapURL)); ((gHippoGridManager->getConnectedGrid()->isSecondLife() || sGotMapURL));
} }
void LLWorldMap::reloadItems(bool force) void LLWorldMap::reloadItems(bool force)

View File

@@ -151,6 +151,7 @@ public:
void setMapImageID (const LLUUID& id, const U8 &layer) { mMapImageID[layer] = id; } void setMapImageID (const LLUUID& id, const U8 &layer) { mMapImageID[layer] = id; }
// Accessors // Accessors
U64 getHandle() const { return mHandle; }
std::string getName() const { return mName; } std::string getName() const { return mName; }
const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); } const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); }
const U32 getRegionFlags() const { return mRegionFlags; } const U32 getRegionFlags() const { return mRegionFlags; }