Merge recent changes

Ansariel 2015-05-30 15:58:12 +02:00
commit 7254f72b7e
7 changed files with 120 additions and 43 deletions

View File

@ -9,6 +9,8 @@
# LINUX - Linux
# WINDOWS - Windows
set(NDTARGET_ARCH "x86" CACHE STRING "Build 64 or 32 bit viewer. Defaults to 32 bit.")
if( ${NDTARGET_ARCH} STREQUAL "x64" )
set( ND_BUILD64BIT_ARCH ON )
elseif( ${NDTARGET_ARCH} STREQUAL "universal" )

View File

@ -2141,7 +2141,8 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
updateLastCamera();
mCameraMode = CAMERA_MODE_MOUSELOOK;
AOEngine::getInstance()->inMouselook(TRUE); // ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
AOEngine::getInstance()->inMouselook(TRUE);
const U32 old_flags = gAgent.getControlFlags();
gAgent.setControlFlags(AGENT_CONTROL_MOUSELOOK);
if (old_flags != gAgent.getControlFlags())
@ -2208,7 +2209,8 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
updateLastCamera();
mCameraMode = CAMERA_MODE_FOLLOW;
AOEngine::getInstance()->inMouselook(FALSE); // ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
AOEngine::getInstance()->inMouselook(FALSE);
// bang-in the current focus, position, and up vector of the follow cam
mFollowCam.reset(mCameraPositionAgent, LLViewerCamera::getInstance()->getPointOfInterest(), LLVector3::z_axis);
@ -2287,7 +2289,8 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
}
updateLastCamera();
mCameraMode = CAMERA_MODE_THIRD_PERSON;
AOEngine::getInstance()->inMouselook(FALSE); // ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
AOEngine::getInstance()->inMouselook(FALSE);
gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK);
}

View File

@ -118,6 +118,38 @@
// </AW: opensim-limits>
#include "nd/ndboolswitch.h" // <FS:ND/> To toggle LLRender::sGLCoreProfile
// <FS:ND> Logging for error and warning messages from colladadom
#include "dae/daeErrorHandler.h"
class FSdaeErrorHandler: public daeErrorHandler
{
public:
virtual void handleError( daeString msg )
{
LL_WARNS( "ColladaDom" ) << msg << LL_ENDL;
}
virtual void handleWarning( daeString msg )
{
LL_WARNS( "ColladaDom" ) << msg << LL_ENDL;
}
};
FSdaeErrorHandler gDaeErrorHandler;
class FSDaeSetErrorHandler
{
public:
FSDaeSetErrorHandler()
{
daeErrorHandler::setErrorHandler( &gDaeErrorHandler );
}
~FSDaeSetErrorHandler()
{
daeErrorHandler::setErrorHandler( NULL );
}
};
// </FS:ND>
// <FS:Ansariel> Proper matrix array length for fitted mesh
#define JOINT_COUNT 52
@ -417,7 +449,6 @@ mCalculateBtn(NULL)
mLastMouseY = 0;
mStatusLock = new LLMutex(NULL);
mModelPreview = NULL;
mLODMode[LLModel::LOD_HIGH] = 0;
for (U32 i = 0; i < LLModel::LOD_HIGH; i++)
{
@ -1543,6 +1574,8 @@ bool LLModelLoader::doLoadModel()
//first, look for a .slm file of the same name that was modified later
//than the .dae
FSDaeSetErrorHandler oErrorHandlerSerror; // <FS:ND/> Set up colladadom error handler.
if (mTrySLM)
{
std::string filename = mFilename;

View File

@ -92,10 +92,9 @@
#include <boost/foreach.hpp>
#include "aoengine.h" // ## Zi: Animation Overrider
//-TT Client LSL Bridge
#include "fslslbridge.h"
//-TT
// Firestorm includes
#include "aoengine.h"
#include "fslslbridge.h"
BOOL LLInventoryState::sWearNewClothing = FALSE;
LLUUID LLInventoryState::sWearNewClothingTransactionID;

View File

@ -122,8 +122,8 @@ extern F32 SPEED_ADJUST_MAX_SEC;
extern F32 ANIM_SPEED_MAX;
extern F32 ANIM_SPEED_MIN;
extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
const F32 MAX_HOVER_Z = 2.0;
const F32 MIN_HOVER_Z = -2.0;
const F32 MAX_HOVER_Z = 2.0f;
const F32 MIN_HOVER_Z = -2.0f;
// #define OUTPUT_BREAST_DATA
@ -2619,7 +2619,8 @@ void LLVOAvatar::idleUpdateLoadingEffect()
mFirstFullyVisible = FALSE;
LLAppearanceMgr::instance().onFirstFullyVisible();
AOEngine::instance().onLoginComplete(); // ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
AOEngine::instance().onLoginComplete();
}
if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
{
@ -3459,12 +3460,15 @@ void LLVOAvatar::idleUpdateBelowWater()
F32 water_height;
water_height = getRegion()->getWaterHeight();
BOOL wasBelowWater = mBelowWater; // ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
BOOL wasBelowWater = mBelowWater;
mBelowWater = avatar_height < water_height;
// ## Zi: Animation Overrider
if (isSelf() && wasBelowWater!=mBelowWater)
// <FS:Zi> Animation Overrider
if (isSelf() && wasBelowWater != mBelowWater)
{
AOEngine::instance().checkBelowWater(mBelowWater);
// ## Zi: Animation Overrider
}
// </FS:Zi> Animation Overrider
}
void LLVOAvatar::slamPosition()
@ -5497,19 +5501,26 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
// ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
//LLUUID remap_id = remapMotionID(id);
LLUUID remap_id;
if(isSelf())
if (isSelf())
{
remap_id=AOEngine::getInstance()->override(id,TRUE);
if(remap_id.isNull())
remap_id=remapMotionID(id);
remap_id = AOEngine::getInstance()->override(id, TRUE);
if (remap_id.isNull())
{
remap_id = remapMotionID(id);
}
else
gAgent.sendAnimationRequest(remap_id,ANIM_REQUEST_START);
{
gAgent.sendAnimationRequest(remap_id, ANIM_REQUEST_START);
}
}
else
remap_id=remapMotionID(id);
// ## Zi: Animation Overrider
{
remap_id = remapMotionID(id);
}
// </FS:Zi> Animation Overrider
if (remap_id != id)
{
@ -5531,19 +5542,26 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
{
LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
// ## Zi: Animation Overrider
// <FS:Zi> Animation Overrider
//LLUUID remap_id = remapMotionID(id);
LLUUID remap_id;
if(isSelf())
if (isSelf())
{
remap_id=AOEngine::getInstance()->override(id,FALSE);
if(remap_id.isNull())
remap_id=remapMotionID(id);
remap_id = AOEngine::getInstance()->override(id, FALSE);
if (remap_id.isNull())
{
remap_id = remapMotionID(id);
}
else
gAgent.sendAnimationRequest(remap_id,ANIM_REQUEST_STOP);
{
gAgent.sendAnimationRequest(remap_id, ANIM_REQUEST_STOP);
}
}
else
remap_id=remapMotionID(id);
// ## Zi: Animation Overrider
{
remap_id = remapMotionID(id);
}
// </FS:Zi> Animation Overrider
if (remap_id != id)
{

View File

@ -4303,22 +4303,44 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
LLMatrix4a final_mat;
final_mat.clear();
S32 idx[4];
// <FS:ND> Avoid the 8 floorf by using SSE2.
// Using _mm_cvttps_epi32 (truncate) under the assumption that the index can never be negative.
// S32 idx[4];
//
// LLVector4 wght;
//
// F32 scale = 0.f;
// for (U32 k = 0; k < 4; k++)
// {
// F32 w = weight[j][k];
//
// idx[k] = (S32) floorf(w);
// wght[k] = w - floorf(w);
// scale += wght[k];
// }
//
// wght *= 1.f/scale;
LLVector4 wght;
LL_ALIGN_16( S32 idx[4] );
LL_ALIGN_16( F32 wght[4] );
F32 scale = 0.f;
for (U32 k = 0; k < 4; k++)
{
F32 w = weight[j][k];
__m128i _mIdx = _mm_cvttps_epi32( weight[j] );
__m128 _mWeight = _mm_sub_ps( weight[j], _mm_cvtepi32_ps( _mIdx ) );
idx[k] = (S32) floorf(w);
wght[k] = w - floorf(w);
scale += wght[k];
}
_mm_store_si128( (__m128i*)idx, _mIdx );
wght *= 1.f/scale;
__m128 _mScale = _mm_add_ps( _mWeight, _mm_movehl_ps( _mWeight, _mWeight ));
_mScale = _mm_add_ss( _mScale, _mm_shuffle_ps( _mScale, _mScale, 1) );
_mScale = _mm_shuffle_ps( _mScale, _mScale, 0 );
_mWeight = _mm_div_ps( _mWeight, _mScale );
_mm_store_ps( wght, _mWeight );
// </FS:ND>
for (U32 k = 0; k < 4; k++)
{
F32 w = wght[k];

View File

@ -435,7 +435,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then
fi
cmake -G "$TARGET" ../indra $CHANNEL $FMODEX $KDU $LEAPMOTION $OPENSIM $AVX_OPTIMIZATION $PACKAGE $UNATTENDED -DLL_TESTS:BOOL=OFF -DWORD_SIZE:STRING=$WORD_SIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE \
-DNDTARGET_ARCH="${TARGET_ARCH}" -DROOT_PROJECT_NAME:STRING=Firestorm $LL_ARGS_PASSTHRU | tee $LOG
-DNDTARGET_ARCH:STRING="${TARGET_ARCH}" -DROOT_PROJECT_NAME:STRING=Firestorm $LL_ARGS_PASSTHRU | tee $LOG
if [ $PLATFORM == "win32" ] ; then
../indra/tools/vstool/VSTool.exe --solution Firestorm.sln --startup firestorm-bin --workingdir firestorm-bin "..\\..\\indra\\newview" --config $BTYPE