Up the maximum field of view to 320, from 175, on request from Tazy Scientist
Better for reallllly wide screens and multiscreen setups, apparently. Also, let's merge with v-r while we're at it, since llcamera.h requires a large-ish recompile Nothing functional though. And some license updates to some identical files in llmath.
This commit is contained in:
@@ -565,6 +565,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
||||
dist_squared = dist_vec_squared(new_pos, target_pos);
|
||||
|
||||
LLQuaternion new_rot = nlerp(lerp_amt, old_rot, target_rot);
|
||||
// FIXME: This can be negative! It is be possible for some rots to 'cancel out' pos or size changes.
|
||||
dist_squared += (1.f - dot(new_rot, target_rot)) * 10.f;
|
||||
|
||||
LLVector3 new_scale = lerp(old_scale, target_scale, lerp_amt);
|
||||
@@ -588,6 +589,15 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The following fixes MAINT-1742 but breaks vehicles similar to MAINT-2275
|
||||
// dist_squared = dist_vec_squared(old_pos, target_pos);
|
||||
|
||||
// The following fixes MAINT-2247 but causes MAINT-2275
|
||||
//dist_squared += (1.f - dot(old_rot, target_rot)) * 10.f;
|
||||
//dist_squared += dist_vec_squared(old_scale, target_scale);
|
||||
}
|
||||
|
||||
LLVector3 vec = mCurrentScale-target_scale;
|
||||
|
||||
@@ -682,17 +692,7 @@ BOOL LLDrawable::updateMove()
|
||||
|
||||
makeActive();
|
||||
|
||||
BOOL done;
|
||||
|
||||
if (isState(MOVE_UNDAMPED))
|
||||
{
|
||||
done = updateMoveUndamped();
|
||||
}
|
||||
else
|
||||
{
|
||||
done = updateMoveDamped();
|
||||
}
|
||||
return done;
|
||||
return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped();
|
||||
}
|
||||
|
||||
BOOL LLDrawable::updateMoveUndamped()
|
||||
@@ -709,7 +709,6 @@ BOOL LLDrawable::updateMoveUndamped()
|
||||
}
|
||||
|
||||
mVObjp->clearChanged(LLXform::MOVED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -833,7 +832,6 @@ void LLDrawable::updateTexture()
|
||||
|
||||
if (getVOVolume())
|
||||
{
|
||||
//getVOVolume()->mFaceMappingChanged = TRUE;
|
||||
gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -1153,8 +1151,8 @@ BOOL LLDrawable::isVisible() const
|
||||
// Spatial Partition Bridging Drawable
|
||||
//=======================================
|
||||
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask)
|
||||
: LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask) :
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
|
||||
{
|
||||
mBridge = this;
|
||||
mDrawable = root;
|
||||
@@ -1242,12 +1240,9 @@ void LLSpatialBridge::updateSpatialExtents()
|
||||
scale.mul(size);
|
||||
mat.rotate(scale, v[3]);
|
||||
|
||||
|
||||
LLVector4a& newMin = mExtents[0];
|
||||
LLVector4a& newMax = mExtents[1];
|
||||
|
||||
newMin = newMax = center;
|
||||
|
||||
for (U32 i = 0; i < 4; i++)
|
||||
{
|
||||
LLVector4a delta;
|
||||
@@ -1419,16 +1414,17 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
|
||||
group->rebound();
|
||||
|
||||
LLVector4a center;
|
||||
center.setAdd(mExtents[0], mExtents[1]);
|
||||
const LLVector4a* exts = getSpatialExtents();
|
||||
center.setAdd(exts[0], exts[1]);
|
||||
center.mul(0.5f);
|
||||
LLVector4a size;
|
||||
size.setSub(mExtents[1], mExtents[0]);
|
||||
size.setSub(exts[1], exts[0]);
|
||||
size.mul(0.5f);
|
||||
|
||||
if ((LLPipeline::sShadowRender && camera_in.AABBInFrustum(center, size)) ||
|
||||
LLPipeline::sImpostorRender ||
|
||||
(camera_in.AABBInFrustumNoFarClip(center, size) &&
|
||||
AABBSphereIntersect(mExtents[0], mExtents[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
|
||||
AABBSphereIntersect(exts[0], exts[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
|
||||
{
|
||||
if (!LLPipeline::sImpostorRender &&
|
||||
!LLPipeline::sShadowRender &&
|
||||
|
||||
@@ -69,7 +69,6 @@ BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE
|
||||
|
||||
#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2])
|
||||
|
||||
|
||||
/*
|
||||
For each vertex, given:
|
||||
B - binormal
|
||||
@@ -398,6 +397,7 @@ void LLFace::setSize(S32 num_vertices, const S32 num_indices, bool align)
|
||||
//allocate vertices in blocks of 4 for alignment
|
||||
num_vertices = (num_vertices + 0x3) & ~0x3;
|
||||
}
|
||||
|
||||
if (mGeomCount != num_vertices ||
|
||||
mIndicesCount != num_indices)
|
||||
{
|
||||
@@ -1311,7 +1311,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
};
|
||||
|
||||
llassert(tep->getShiny() <= 3);
|
||||
|
||||
color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
|
||||
}
|
||||
}
|
||||
@@ -1525,7 +1524,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
}
|
||||
|
||||
glBindBufferARB(GL_TRANSFORM_FEEDBACK_BUFFER, 0);
|
||||
|
||||
gGL.popMatrix();
|
||||
|
||||
if (cur_shader)
|
||||
@@ -2385,8 +2383,6 @@ F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
|
||||
return 0.f ;
|
||||
}
|
||||
|
||||
//F32 camera_relative_speed = camera_moving_speed * (lookAt * LLViewerCamera::getInstance()->getVelocityDir()) ;
|
||||
|
||||
S32 i = 0 ;
|
||||
for(i = 0; i < FACE_IMPORTANCE_LEVEL && dist > FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][0]; ++i);
|
||||
i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ;
|
||||
@@ -2427,16 +2423,7 @@ BOOL LLFace::verify(const U32* indices_array) const
|
||||
BOOL ok = TRUE;
|
||||
|
||||
if( mVertexBuffer.isNull() )
|
||||
{
|
||||
if( mGeomCount )
|
||||
{
|
||||
// This happens before teleports as faces are torn down.
|
||||
// Stop the crash in DEV-31893 with a null pointer check,
|
||||
// but present this info.
|
||||
// To clean up the log, the geometry could be cleared, or the
|
||||
// face could otherwise be marked for no ::verify.
|
||||
//AIFIXME: llinfos << "Face with no vertex buffer and " << mGeomCount << " mGeomCount" << llendl;
|
||||
}
|
||||
{ //no vertex buffer, face is implicitly valid
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ extern bool gShiftFrame;
|
||||
extern U64 gFrameTime;
|
||||
extern LLPipeline gPipeline;
|
||||
|
||||
LLSurfacePatch::LLSurfacePatch() :
|
||||
mHasReceivedData(FALSE),
|
||||
LLSurfacePatch::LLSurfacePatch()
|
||||
: mHasReceivedData(FALSE),
|
||||
mSTexUpdate(FALSE),
|
||||
mDirty(FALSE),
|
||||
mDirtyZStats(TRUE),
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#include <map>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
@@ -160,18 +161,19 @@ void LLWorld::setRegionSize(const U32& width, const U32& length)
|
||||
mWidthInMeters = mWidth * mScale;
|
||||
}
|
||||
|
||||
|
||||
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
{
|
||||
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
|
||||
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
|
||||
if (regionp)
|
||||
{
|
||||
llinfos << "Region exists, removing it " << llendl;
|
||||
LLHost old_host = regionp->getHost();
|
||||
// region already exists!
|
||||
if (host == old_host && regionp->isAlive())
|
||||
{
|
||||
// This is a duplicate for the same host and it's alive, don't bother.
|
||||
llinfos << "Region already exists and is alive, using existing region" << llendl;
|
||||
return regionp;
|
||||
}
|
||||
|
||||
@@ -189,6 +191,10 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
// matches, because all the agent state for the new camera is completely different.
|
||||
removeRegion(old_host);
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Region does not exist, creating new one" << llendl;
|
||||
}
|
||||
|
||||
U32 iindex = 0;
|
||||
U32 jindex = 0;
|
||||
@@ -199,8 +205,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
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;
|
||||
llinfos << "Adding new region (" << x << ":" << y << ")"
|
||||
<< " on host: " << host << llendl;
|
||||
|
||||
LLVector3d origin_global;
|
||||
|
||||
@@ -272,7 +278,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
|
||||
if (neighborp && last_neighborp != neighborp)
|
||||
{
|
||||
//llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl;
|
||||
//LL_INFOS() << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << LL_ENDL;
|
||||
regionp->connectNeighbor(neighborp, dir);
|
||||
last_neighborp = neighborp;
|
||||
}
|
||||
@@ -341,6 +347,7 @@ void LLWorld::removeRegion(const LLHost &host)
|
||||
mVisibleRegionList.remove(regionp);
|
||||
|
||||
mRegionRemovedSignal(regionp);
|
||||
|
||||
//double check all objects of this region are removed.
|
||||
gObjectList.clearAllMapObjectsInRegion(regionp) ;
|
||||
//llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
|
||||
@@ -1540,20 +1547,19 @@ void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d
|
||||
|
||||
if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy)
|
||||
{
|
||||
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
|
||||
LLUUID uuid = pVOAvatar->getID();
|
||||
if(!uuid.isNull())
|
||||
|
||||
if (!uuid.isNull()
|
||||
&& dist_vec_squared(pos_global, relative_to) <= radius_squared)
|
||||
{
|
||||
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
|
||||
if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
|
||||
if(positions != NULL)
|
||||
{
|
||||
if(positions != NULL)
|
||||
{
|
||||
positions->push_back(pos_global);
|
||||
}
|
||||
if(avatar_ids !=NULL)
|
||||
{
|
||||
avatar_ids->push_back(uuid);
|
||||
}
|
||||
positions->push_back(pos_global);
|
||||
}
|
||||
if(avatar_ids !=NULL)
|
||||
{
|
||||
avatar_ids->push_back(uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user