Merge LGPL

Tank_Master 2013-09-12 21:18:44 -07:00
commit eaaf782fdf
13 changed files with 66 additions and 10 deletions

View File

@ -396,6 +396,7 @@ public:
child->insert(data);
}
}
#ifndef OPENSIM // <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
else
{
//it's not in here, give it to the root
@ -411,6 +412,7 @@ public:
node->insert(data);
}
#endif // <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
return false;
}
@ -734,7 +736,6 @@ public:
return false;
}
#ifndef OPENSIM // <FS:ND> FIRE-11593; Don't limit center of octree to 2^20, otherwise we end with the famous longjump bug (cannot TP further than 4095 regions [4096*256 = 2^20]
LLVector4a MAX_MAG;
MAX_MAG.splat(1024.f*1024.f);
@ -750,7 +751,6 @@ public:
//OCT_ERRS << "!!! ELEMENT EXCEEDS RANGE OF SPATIAL PARTITION !!!" << llendl;
return false;
}
#endif // <FS:ND> FIRE-11593
if (this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup()))
{

View File

@ -130,7 +130,9 @@ inline U8 F32_TO_STRING(F32 val, F32 lower, F32 upper)
val -= lower; //[0, upper-lower]
val /= (upper - lower); //[0,1]
val = val * MAXSTRINGVAL; //[0, MAXSTRINGVAL]
val = floor(val + 0.5f); //[0, MAXSTRINGVAL]
// <FS:CR> Fix implicit conversaion float to double
//val = floor(val + 0.5f); //[0, MAXSTRINGVAL]
val = floorf(val + 0.5f); //[0, MAXSTRINGVAL]
U8 stringVal = (U8)(val) + FIRSTVALIDCHAR; //[FIRSTVALIDCHAR, MAXSTRINGVAL + FIRSTVALIDCHAR]
return stringVal;

View File

@ -40,7 +40,7 @@
#include <boost/graph/graph_concepts.hpp>
FloaterAO::FloaterAO(const LLSD& key)
: LLTransientDockableFloater(NULL,true,key),LLEventTimer(10.0),
: LLTransientDockableFloater(NULL,true,key),LLEventTimer(10.f),
mSetList(0),
mSelectedSet(0),
mSelectedState(0),

View File

@ -78,7 +78,7 @@ class JCZdrop : public LLEventTimer
public:
BOOL mRunning;
JCZdrop(std::stack<LLViewerInventoryItem*> stack, LLUUID dest, std::string sFolder, std::string sUUID, bool package = false) : LLEventTimer(1.0), mRunning(FALSE)
JCZdrop(std::stack<LLViewerInventoryItem*> stack, LLUUID dest, std::string sFolder, std::string sUUID, bool package = false) : LLEventTimer(1.f), mRunning(FALSE)
{
mPackage = package;
instack = stack;

View File

@ -37,7 +37,7 @@
#include "llchat.h"
bool cmd_line_chat(std::string revised_text, EChatType type, bool from_gesture = false);
void cmdline_rezplat(bool use_saved_value = true, F32 visual_radius = 30.0);
void cmdline_rezplat(bool use_saved_value = true, F32 visual_radius = 30.f);
void cmdline_tp2name(std::string target);
LLUUID cmdline_partial_name2key(std::string name);

View File

@ -3556,7 +3556,15 @@ bool LLAppViewer::initWindow()
.height(gSavedSettings.getU32("WindowHeight"))
.min_width(gSavedSettings.getU32("MinWindowWidth"))
.min_height(gSavedSettings.getU32("MinWindowHeight"))
/// <FS:CR> Since the 3.6.5 merge, setting fullscreen does terrible bad things on macs like opening
/// all floaters and menus off the left side of the screen. Let's not do that right now...
/// Hardcoding full screen OFF until it's fixed. On 10.7+ we have native full screen support anyway.
#ifndef LL_DARWIN
.fullscreen(gSavedSettings.getBOOL("FullScreen"))
#else // !LL_DARWIN
.fullscreen(false)
#endif LL_DARWIN
// </FS:CR>
.ignore_pixel_depth(ignorePixelDepth);
gViewerWindow = new LLViewerWindow(window_params);

View File

@ -2751,6 +2751,11 @@ static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("pan
BOOL LLPanelPreferenceGraphics::postBuild()
{
mButtonApply=findChild<LLButton>("Apply");
// <FS:CR> Hide this until we have fullscreen mode functional on OSX again
#ifdef LL_DARWIN
getChild<LLCheckBoxCtrl>("Fullscreen Mode")->setVisible(FALSE);
#endif // LL_DARWIN
// </FS:CR>
return LLPanelPreference::postBuild();
}

View File

@ -5068,6 +5068,25 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
gAgent.getRegion()->getOriginGlobal());
gAgent.setRegion(regionp);
gObjectList.shiftObjects(shift_vector);
// <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
#ifdef OPENSIM
// Is this a really long jump?
if (shift_vector.length() > 2048.f * 256.f)
{
regionp->reInitPartitions();
gAgent.setRegion(regionp);
// Kill objects in the regions we left behind
for (LLWorld::region_list_t::const_iterator r = LLWorld::getInstance()->getRegionList().begin();
r != LLWorld::getInstance()->getRegionList().end(); ++r)
{
if (*r != regionp)
{
gObjectList.killObjects(*r);
}
}
}
#endif
// </FS:CR>
gAssetStorage->setUpstream(msg->getSender());
gCacheName->setUpstream(msg->getSender());
gViewerThrottle.sendToSim();

View File

@ -734,7 +734,9 @@ void LLViewerPartSim::updateSimulation()
LLViewerObject* vobj = mViewerPartGroups[i]->mVOPartGroupp;
S32 visirate = 1;
if (vobj)
// <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
//if (vobj)
if (vobj && vobj->mDrawable)
{
LLSpatialGroup* group = vobj->mDrawable->getSpatialGroup();
if (group && !group->isVisible()) // && !group->isState(LLSpatialGroup::OBJECT_DIRTY))
@ -745,7 +747,9 @@ void LLViewerPartSim::updateSimulation()
if ((LLDrawable::getCurrentFrame()+mViewerPartGroups[i]->mID)%visirate == 0)
{
if (vobj)
// <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
// <vobj)
if (vobj && vobj->mDrawable)
{
gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}

View File

@ -401,6 +401,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
// Create the object lists
initStats();
// <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
initPartitions();
}
void LLViewerRegion::initPartitions()
{
// </FS:CR>
//create object partitions
//MUST MATCH declaration of eObjectPartitions
@ -420,6 +426,14 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer));
}
// <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
void LLViewerRegion::reInitPartitions()
{
std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer());
mImpl->mObjectPartition.clear();
initPartitions();
}
// </FS:CR>
void LLViewerRegion::initStats()
{

View File

@ -388,10 +388,12 @@ public:
};
void showReleaseNotes();
void reInitPartitions(); // <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
protected:
void disconnectAllNeighbors();
void initStats();
void initPartitions(); // <FS:CR> FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa
public:
LLWind mWind;

View File

@ -246,7 +246,9 @@ public:
inline F32 getStdDev() const
{
const F32 mean = getMean();
return (mCount < 2) ? 0.f : sqrt(llmax(0.f,mSumOfSquares/mCount - (mean * mean)));
// <FS:CR> Fix implicit conversion double to float
//return (mCount < 2) ? 0.f : sqrt(llmax(0.f,mSumOfSquares/mCount - (mean * mean)));
return (mCount < 2) ? 0.f : sqrtf(llmax(0.f,mSumOfSquares/mCount - (mean * mean)));
}
inline U32 getCount() const

View File

@ -378,7 +378,7 @@ private:
class RlvGCTimer : public LLEventTimer
{
public:
RlvGCTimer() : LLEventTimer(30.0) {}
RlvGCTimer() : LLEventTimer(30.f) {}
virtual BOOL tick();
};