diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index ebcf9651ec..97bd7f98b3 100755 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -396,6 +396,7 @@ public: child->insert(data); } } +#ifndef OPENSIM // 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 // FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa return false; } @@ -734,7 +736,6 @@ public: return false; } -#ifndef OPENSIM // 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 // FIRE-11593 if (this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup())) { diff --git a/indra/llmath/llquantize.h b/indra/llmath/llquantize.h index 1595dbecf8..69c19b02dd 100755 --- a/indra/llmath/llquantize.h +++ b/indra/llmath/llquantize.h @@ -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] + // 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; diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 44b9834212..4e6bd0e661 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -40,7 +40,7 @@ #include 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), diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 12d0133292..8411aa3337 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -78,7 +78,7 @@ class JCZdrop : public LLEventTimer public: BOOL mRunning; - JCZdrop(std::stack stack, LLUUID dest, std::string sFolder, std::string sUUID, bool package = false) : LLEventTimer(1.0), mRunning(FALSE) + JCZdrop(std::stack stack, LLUUID dest, std::string sFolder, std::string sUUID, bool package = false) : LLEventTimer(1.f), mRunning(FALSE) { mPackage = package; instack = stack; diff --git a/indra/newview/chatbar_as_cmdline.h b/indra/newview/chatbar_as_cmdline.h index a735915147..2f3eab8085 100644 --- a/indra/newview/chatbar_as_cmdline.h +++ b/indra/newview/chatbar_as_cmdline.h @@ -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); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 26323985c0..f1ad23ad1a 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3556,7 +3556,15 @@ bool LLAppViewer::initWindow() .height(gSavedSettings.getU32("WindowHeight")) .min_width(gSavedSettings.getU32("MinWindowWidth")) .min_height(gSavedSettings.getU32("MinWindowHeight")) +/// 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 +// .ignore_pixel_depth(ignorePixelDepth); gViewerWindow = new LLViewerWindow(window_params); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 8cd16e70a4..7361aa51ad 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2751,6 +2751,11 @@ static LLRegisterPanelClassWrapper t_pref_privacy("pan BOOL LLPanelPreferenceGraphics::postBuild() { mButtonApply=findChild("Apply"); +// Hide this until we have fullscreen mode functional on OSX again +#ifdef LL_DARWIN + getChild("Fullscreen Mode")->setVisible(FALSE); +#endif // LL_DARWIN +// return LLPanelPreference::postBuild(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c0db598215..79b6044c40 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5068,6 +5068,25 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gAgent.getRegion()->getOriginGlobal()); gAgent.setRegion(regionp); gObjectList.shiftObjects(shift_vector); +// 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 +// gAssetStorage->setUpstream(msg->getSender()); gCacheName->setUpstream(msg->getSender()); gViewerThrottle.sendToSim(); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 9cb3e8b4a9..4105d0c855 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -734,7 +734,9 @@ void LLViewerPartSim::updateSimulation() LLViewerObject* vobj = mViewerPartGroups[i]->mVOPartGroupp; S32 visirate = 1; - if (vobj) + // 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) + // FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa + // mDrawable) { gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL, TRUE); } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 01f19528df..64ade2ad99 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -401,6 +401,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, // Create the object lists initStats(); +// FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa + initPartitions(); +} +void LLViewerRegion::initPartitions() +{ +// //create object partitions //MUST MATCH declaration of eObjectPartitions @@ -420,6 +426,14 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer)); } +// 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(); +} +// void LLViewerRegion::initStats() { diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index bd48e67ca1..41bb4486c0 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -388,10 +388,12 @@ public: }; void showReleaseNotes(); + void reInitPartitions(); // FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa protected: void disconnectAllNeighbors(); void initStats(); + void initPartitions(); // FIRE-11593: Opensim "4096 Bug" Fix by Latif Khalifa public: LLWind mWind; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 6b2461be41..fdf534bd77 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -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))); + // 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 diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index 31d4898535..d56d920cfe 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -378,7 +378,7 @@ private: class RlvGCTimer : public LLEventTimer { public: - RlvGCTimer() : LLEventTimer(30.0) {} + RlvGCTimer() : LLEventTimer(30.f) {} virtual BOOL tick(); };