Rip out emerald boob physics
This commit is contained in:
@@ -87,7 +87,6 @@ set(viewer_SOURCE_FILES
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
chatbar_as_cmdline.cpp
|
||||
emeraldboobutils.cpp
|
||||
floaterao.cpp
|
||||
floaterlocalassetbrowse.cpp
|
||||
floatervoicelicense.cpp
|
||||
@@ -588,7 +587,6 @@ set(viewer_HEADER_FILES
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
chatbar_as_cmdline.h
|
||||
emeraldboobutils.h
|
||||
floaterao.h
|
||||
floaterlocalassetbrowse.h
|
||||
floatervoicelicense.h
|
||||
|
||||
@@ -219,14 +219,6 @@ void LLPrefsAscentVan::refreshValues()
|
||||
mColorMutedChat = gSavedSettings.getBOOL("ColorMutedChat");
|
||||
// mColorCustomChat = gSavedSettings.getBOOL("ColorCustomChat");
|
||||
|
||||
//Body Dynamics --------------------------------------------------------------------------
|
||||
mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle");
|
||||
mBoobMass = gSavedSettings.getF32("EmeraldBoobMass");
|
||||
mBoobHardness = gSavedSettings.getF32("EmeraldBoobHardness");
|
||||
mBoobVelMax = gSavedSettings.getF32("EmeraldBoobVelMax");
|
||||
mBoobFriction = gSavedSettings.getF32("EmeraldBoobFriction");
|
||||
mBoobVelMin = gSavedSettings.getF32("EmeraldBoobVelMin");
|
||||
|
||||
mAvatarXModifier = gSavedSettings.getF32("AscentAvatarXModifier");
|
||||
mAvatarYModifier = gSavedSettings.getF32("AscentAvatarYModifier");
|
||||
mAvatarZModifier = gSavedSettings.getF32("AscentAvatarZModifier");
|
||||
@@ -252,13 +244,6 @@ void LLPrefsAscentVan::refresh()
|
||||
childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
|
||||
childSetEnabled("custom_tag_color_text", mCustomTagOn);
|
||||
childSetEnabled("custom_tag_color_swatch", mCustomTagOn);
|
||||
|
||||
//Body Dynamics --------------------------------------------------------------------------
|
||||
childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle);
|
||||
childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle);
|
||||
childSetEnabled("EmeraldBoobVelMax", mBreastPhysicsToggle);
|
||||
childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle);
|
||||
childSetEnabled("EmeraldBoobVelMin", mBreastPhysicsToggle);
|
||||
}
|
||||
|
||||
// Reset settings to local copy
|
||||
@@ -302,14 +287,6 @@ void LLPrefsAscentVan::cancel()
|
||||
gSavedSettings.setBOOL("ColorMutedChat", mColorMutedChat);
|
||||
// gSavedSettings.setBOOL("ColorCustomChat", mColorCustomChat);
|
||||
|
||||
//Body Dynamics --------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("EmeraldBreastPhysicsToggle", mBreastPhysicsToggle);
|
||||
gSavedSettings.setF32("EmeraldBoobMass", mBoobMass);
|
||||
gSavedSettings.setF32("EmeraldBoobHardness", mBoobHardness);
|
||||
gSavedSettings.setF32("EmeraldBoobVelMax", mBoobVelMax);
|
||||
gSavedSettings.setF32("EmeraldBoobFriction", mBoobFriction);
|
||||
gSavedSettings.setF32("EmeraldBoobVelMin", mBoobVelMin);
|
||||
|
||||
gSavedSettings.setF32("AscentAvatarXModifier", mAvatarXModifier);
|
||||
gSavedSettings.setF32("AscentAvatarYModifier", mAvatarYModifier);
|
||||
gSavedSettings.setF32("AscentAvatarZModifier", mAvatarZModifier);
|
||||
|
||||
@@ -88,13 +88,7 @@ protected:
|
||||
bool mColorLindenChat;
|
||||
bool mColorMutedChat;
|
||||
// bool mColorCustomChat;
|
||||
//Body Dynamics
|
||||
BOOL mBreastPhysicsToggle;
|
||||
F32 mBoobMass;
|
||||
F32 mBoobHardness;
|
||||
F32 mBoobVelMax;
|
||||
F32 mBoobFriction;
|
||||
F32 mBoobVelMin;
|
||||
|
||||
F32 mAvatarXModifier;
|
||||
F32 mAvatarYModifier;
|
||||
F32 mAvatarZModifier;
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "emeraldboobutils.h"
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v)
|
||||
{
|
||||
os << "EmeraldBoobConfig" << std::endl;
|
||||
os << "enabled: " << v.enabled << std::endl;
|
||||
os << "mass: " << v.mass << std::endl;
|
||||
os << "hardness: " << v.hardness << std::endl;
|
||||
os << "zMax: " << v.zMax << std::endl;
|
||||
os << "velMin: " << v.velMin << std::endl;
|
||||
os << "velMax: " << v.velMax << std::endl;
|
||||
os << "zInfluence: " << v.zInfluence << std::endl;
|
||||
os << "friction: " << v.friction << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v)
|
||||
{
|
||||
os << "EmeraldAvatarLocalBoobConfig" << std::endl;
|
||||
os << "actualBoobGrav: " << v.actualBoobGrav << std::endl;
|
||||
os << "boobSize: " << v.boobSize << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v)
|
||||
{
|
||||
os << "EmeraldBoobState" << std::endl;
|
||||
os << "boobGrav: " << v.boobGrav << std::endl;
|
||||
os << "chestPosition: " << v.chestPosition << std::endl;
|
||||
os << "chestRotation: " << v.chestRotation << std::endl;
|
||||
os << "elapsedTime: " << v.elapsedTime << std::endl;
|
||||
os << "frameDuration: " << v.frameDuration << std::endl;
|
||||
os << "chestDisplacement: " << v.chestDisplacement << std::endl;
|
||||
os << "localChestDisplacement: " << v.localChestDisplacement << std::endl;
|
||||
os << "Number of bounceStates: " << v.bounceStates.size() << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v)
|
||||
{
|
||||
os << "EmeraldBoobInputs" << std::endl;
|
||||
os << "chestPosition: " << v.chestPosition << std::endl;
|
||||
os << "chestRotation: " << v.chestRotation << std::endl;
|
||||
os << "elapsedTime: " << v.elapsedTime << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v)
|
||||
{
|
||||
os << "EmeraldBoobBounceState" << std::endl;
|
||||
os << "bounceStart: " << v.bounceStart << std::endl;
|
||||
os << "bounceStartAmplitude: " << v.bounceStartAmplitude << std::endl;
|
||||
os << "bounceStartFrameDuration: " << v.bounceStartFrameDuration << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
F32 EmeraldBoobUtils::convertMass(F32 displayMass)
|
||||
{ return displayMass/100.f*150.f; };
|
||||
|
||||
F32 EmeraldBoobUtils::convertHardness(F32 displayHardness)
|
||||
{ return displayHardness/100.f*50; };
|
||||
|
||||
F32 EmeraldBoobUtils::convertVelMax(F32 displayVelMax)
|
||||
{ return displayVelMax/100.f*0.01f; };
|
||||
|
||||
F32 EmeraldBoobUtils::convertFriction(F32 displayFriction)
|
||||
{ return displayFriction/100.f*1.0f; };
|
||||
|
||||
F32 EmeraldBoobUtils::convertVelMin(F32 displayVelMin)
|
||||
{ return displayVelMin/100.f; };
|
||||
|
||||
EmeraldBoobState EmeraldBoobUtils::idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs)
|
||||
{
|
||||
EmeraldBoobState newState;
|
||||
F32 avatarLocalMass = 0.0f;
|
||||
F32 partMod = 1.f;
|
||||
|
||||
if(!config.enabled)
|
||||
return newState;
|
||||
|
||||
newState.boobGrav = localConfig.actualBoobGrav;
|
||||
avatarLocalMass = (llclamp(localConfig.boobSize, 0.0f, 0.5f) / 0.5f);
|
||||
|
||||
newState.elapsedTime = inputs.elapsedTime;
|
||||
// seemed to create incorrect amounts of velocity when FPS varied
|
||||
newState.frameDuration = inputs.elapsedTime - oldState.elapsedTime;
|
||||
newState.chestPosition = inputs.chestPosition;
|
||||
newState.chestRotation = inputs.chestRotation;
|
||||
newState.chestDisplacement = inputs.chestPosition - oldState.chestPosition;
|
||||
newState.localChestDisplacement = newState.chestDisplacement * ~inputs.chestRotation;
|
||||
|
||||
|
||||
std::list<EmeraldBoobBounceState> bounceStates = oldState.bounceStates;
|
||||
|
||||
if(fabs(newState.localChestDisplacement.length()) > 0.f)
|
||||
{
|
||||
F32 boobVel = 0.f;
|
||||
boobVel = newState.localChestDisplacement.mV[VZ];
|
||||
boobVel += newState.localChestDisplacement[VX] * config.XYInfluence;
|
||||
boobVel += newState.localChestDisplacement.mV[VY] * config.XYInfluence;
|
||||
boobVel = llclamp(boobVel, -config.velMax, config.velMax);
|
||||
boobVel *= newState.frameDuration * 0.3f * 100.f;
|
||||
|
||||
if(fabs(boobVel) <= config.velMin * newState.frameDuration * 100.f)
|
||||
boobVel = 0.0f;
|
||||
else
|
||||
{
|
||||
EmeraldBoobBounceState bounceState;
|
||||
bounceState.bounceStart = inputs.elapsedTime;
|
||||
bounceState.bounceStartFrameDuration = newState.frameDuration;
|
||||
bounceState.bounceStartAmplitude = boobVel;
|
||||
bounceState.bounceStartAmplitude *= avatarLocalMass;
|
||||
bounceState.bounceStartAmplitude *= config.mass;
|
||||
bounceStates.push_front(bounceState);
|
||||
}
|
||||
}
|
||||
|
||||
F32 totalNewAmplitude = 0.0f;
|
||||
//std::cout << "Beginning bounce State processing at time " << inputs.elapsedTime << std::endl;
|
||||
while(!bounceStates.empty()) {
|
||||
EmeraldBoobBounceState bounceState = bounceStates.front();
|
||||
//std::cout << "Now processing " << bounceState;
|
||||
bounceStates.pop_front();
|
||||
F32 bounceTime = newState.elapsedTime-bounceState.bounceStart;
|
||||
F32 newAmplitude = bounceState.bounceStartAmplitude*pow(60.f*config.friction, -bounceTime)*cos(config.hardness*partMod*bounceTime);
|
||||
if(fabs(newAmplitude) < 0.005f) {
|
||||
newAmplitude = 0.0f;
|
||||
} else {
|
||||
newState.bounceStates.push_front(bounceState);
|
||||
}
|
||||
totalNewAmplitude+=newAmplitude;
|
||||
}
|
||||
|
||||
newState.boobGrav = totalNewAmplitude;
|
||||
|
||||
|
||||
newState.boobGrav = llclamp(newState.boobGrav, -1.5f, 2.0f);
|
||||
|
||||
return newState;
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
#ifndef __emeraldboobutils_h
|
||||
#define __emeraldboobutils_h
|
||||
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
#include "stdtypes.h"
|
||||
#include "v3math.h"
|
||||
#include "llquaternion.h"
|
||||
|
||||
struct EmeraldGlobalBoobConfig
|
||||
{
|
||||
bool enabled;
|
||||
F32 mass;
|
||||
F32 hardness;
|
||||
F32 zMax;
|
||||
F32 velMin;
|
||||
F32 velMax;
|
||||
F32 zInfluence;
|
||||
F32 friction;
|
||||
F32 XYInfluence;
|
||||
|
||||
EmeraldGlobalBoobConfig()
|
||||
: enabled(false),
|
||||
mass(6.4f),
|
||||
hardness(0.67f),
|
||||
zMax(1.29f),
|
||||
velMin(0.0027f*0.017f),
|
||||
velMax(0.0027f),
|
||||
zInfluence(0.0f),
|
||||
friction(0.35f),
|
||||
XYInfluence(0.3f)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v);
|
||||
|
||||
struct EmeraldAvatarLocalBoobConfig
|
||||
{
|
||||
F32 actualBoobGrav;
|
||||
F32 boobSize;
|
||||
|
||||
EmeraldAvatarLocalBoobConfig()
|
||||
: actualBoobGrav(0.0f),
|
||||
boobSize(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==(const EmeraldAvatarLocalBoobConfig &other) const
|
||||
{
|
||||
return
|
||||
actualBoobGrav == other.actualBoobGrav &&
|
||||
boobSize == other.boobSize;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v);
|
||||
|
||||
struct EmeraldBoobBounceState;
|
||||
|
||||
struct EmeraldBoobState
|
||||
{
|
||||
F32 boobGrav;
|
||||
LLVector3 chestPosition;
|
||||
LLQuaternion chestRotation;
|
||||
F32 elapsedTime;
|
||||
F32 frameDuration;
|
||||
LLVector3 chestDisplacement;
|
||||
LLVector3 localChestDisplacement;
|
||||
std::list<EmeraldBoobBounceState> bounceStates;
|
||||
|
||||
EmeraldBoobState()
|
||||
: boobGrav(0.0f),
|
||||
chestPosition(0.0f,0.0f,0.0f),
|
||||
chestRotation(0.0f,0.0f,0.0f,1.0f),
|
||||
elapsedTime(0.0f),
|
||||
frameDuration(0.0f),
|
||||
chestDisplacement(0.0f,0.0f,0.0f),
|
||||
localChestDisplacement(0.0f,0.0f,0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==(const EmeraldBoobState &other) const
|
||||
{
|
||||
return
|
||||
boobGrav == other.boobGrav &&
|
||||
chestPosition == other.chestPosition &&
|
||||
chestRotation == other.chestRotation &&
|
||||
elapsedTime == other.elapsedTime &&
|
||||
frameDuration == other.frameDuration &&
|
||||
chestDisplacement == other.chestDisplacement &&
|
||||
localChestDisplacement == other.localChestDisplacement &&
|
||||
bounceStates == other.bounceStates;
|
||||
}
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v);
|
||||
|
||||
struct EmeraldBoobInputs
|
||||
{
|
||||
LLVector3 chestPosition;
|
||||
LLQuaternion chestRotation;
|
||||
F32 elapsedTime;
|
||||
|
||||
EmeraldBoobInputs()
|
||||
: chestPosition(0.0f,0.0f,0.0f),
|
||||
chestRotation(0.0f,0.0f,0.0f,1.0f),
|
||||
elapsedTime(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==(const EmeraldBoobInputs &other) const
|
||||
{
|
||||
return
|
||||
chestPosition == other.chestPosition &&
|
||||
chestRotation == other.chestRotation &&
|
||||
elapsedTime == other.elapsedTime;
|
||||
}
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v);
|
||||
|
||||
struct EmeraldBoobBounceState
|
||||
{
|
||||
F32 bounceStart;
|
||||
F32 bounceStartAmplitude;
|
||||
F32 bounceStartFrameDuration;
|
||||
|
||||
EmeraldBoobBounceState()
|
||||
: bounceStart(0.0f),
|
||||
bounceStartAmplitude(0.0f),
|
||||
bounceStartFrameDuration(0.0f)
|
||||
{
|
||||
};
|
||||
|
||||
bool operator==(const EmeraldBoobBounceState &other) const
|
||||
{
|
||||
return
|
||||
bounceStart == other.bounceStart &&
|
||||
bounceStartAmplitude == other.bounceStartAmplitude &&
|
||||
bounceStartFrameDuration == other.bounceStartFrameDuration;
|
||||
}
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v);
|
||||
|
||||
|
||||
struct EmeraldBoobUtils
|
||||
{
|
||||
public:
|
||||
static EmeraldBoobState idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs);
|
||||
|
||||
static F32 convertMass(F32 displayMass);
|
||||
static F32 convertHardness(F32 displayHardness);
|
||||
static F32 convertVelMax(F32 displayVelMax);
|
||||
static F32 convertFriction(F32 displayFriction);
|
||||
static F32 convertVelMin(F32 displayVelMin);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1308,30 +1308,6 @@ void LLAgentWearables::removeWearableFinal( LLWearableType::EType type, bool do_
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
/*static bool isFirstPhysicsWearable(LLWearableType::EType type, LLInventoryItem *new_item, LLWearable *new_wearable)
|
||||
{
|
||||
if (type == LLWearableType::WT_PHYSICS && gSavedSettings.getWarning("FirstPhysicsWearable"))
|
||||
{
|
||||
class WearableDelayedCallback
|
||||
{
|
||||
public:
|
||||
static void setDelayedWearable( const LLSD& notification, const LLSD& response, LLUUID item_id, LLWearable *wearable )
|
||||
{
|
||||
if(LLNotification::getSelectedOption(notification, response) == 0) //User selected wear
|
||||
{
|
||||
gSavedSettings.setWarning("FirstPhysicsWearable",FALSE);
|
||||
LLInventoryItem *item = gInventory.getItem(item_id);
|
||||
if(item)
|
||||
gAgentWearables.setWearableItem(item,wearable); //re-enter.
|
||||
}
|
||||
}
|
||||
};
|
||||
LLNotificationsUtil::add("FirstPhysicsWearable",LLSD(),LLSD(),boost::bind(WearableDelayedCallback::setDelayedWearable, _1, _2, new_item->getUUID(),new_wearable));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}*/
|
||||
|
||||
// Assumes existing wearables are not dirty.
|
||||
void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items,
|
||||
const LLDynamicArray< LLViewerWearable* >& wearables,
|
||||
@@ -1373,11 +1349,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
||||
{
|
||||
const LLWearableType::EType type = new_wearable->getType();
|
||||
|
||||
/*if (isFirstPhysicsWearable(type, new_item, new_wearable))
|
||||
{
|
||||
return;
|
||||
}*/
|
||||
|
||||
new_wearable->setName(new_item->getName());
|
||||
new_wearable->setItemID(new_item->getUUID());
|
||||
|
||||
|
||||
@@ -2193,7 +2193,6 @@ bool LLAppViewer::initConfiguration()
|
||||
LLFirstUse::addConfigVariable("FirstSculptedPrim");
|
||||
LLFirstUse::addConfigVariable("FirstVoice");
|
||||
LLFirstUse::addConfigVariable("FirstMedia");
|
||||
LLFirstUse::addConfigVariable("FirstPhysicsWearable");
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a
|
||||
//LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH);
|
||||
|
||||
@@ -109,9 +109,7 @@ public:
|
||||
mLastTime(0),
|
||||
mPosition_local(0),
|
||||
mVelocityJoint_local(0),
|
||||
mPositionLastUpdate_local(0),
|
||||
mAccelerationJoint_local(0),
|
||||
mVelocity_local(0)
|
||||
mPositionLastUpdate_local(0)
|
||||
{
|
||||
mJointState = new LLJointState;
|
||||
|
||||
@@ -119,8 +117,7 @@ public:
|
||||
{
|
||||
mParamCache[i] = NULL;
|
||||
}
|
||||
}
|
||||
void getString(std::ostringstream &oss);
|
||||
}
|
||||
|
||||
BOOL initialize();
|
||||
|
||||
@@ -132,8 +129,6 @@ public:
|
||||
{
|
||||
return mJointState;
|
||||
}
|
||||
|
||||
void reset();
|
||||
protected:
|
||||
|
||||
F32 getParamValue(eParamName param)
|
||||
@@ -238,84 +233,9 @@ BOOL LLPhysicsMotion::initialize()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLPhysicsMotionController::getString()
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "{" << std::endl <<
|
||||
"Active: " << mActive << std::endl <<
|
||||
"IsDefault: " << mIsDefault << std::endl <<
|
||||
"Stopped: " << isStopped() << std::endl <<
|
||||
"Name: " << getName() << std::endl <<
|
||||
"ID: " << getID().asString() << std::endl;
|
||||
|
||||
for (motion_vec_t::iterator iter = mMotions.begin();iter != mMotions.end();++iter)
|
||||
{
|
||||
(*iter)->getString(oss);
|
||||
}
|
||||
oss << "}" << std::endl;
|
||||
return oss.str();
|
||||
}
|
||||
void getParamString(U32 depth, LLViewerVisualParam *param, std::ostringstream &oss)
|
||||
{
|
||||
std::string indent;
|
||||
indent.resize(depth,' ');
|
||||
|
||||
oss <<
|
||||
indent << "getID: " << param->getID() << std::endl <<
|
||||
indent << "getName: " << param->getName() << std::endl <<
|
||||
indent << "getDisplayName: " << param->getDisplayName() << std::endl <<
|
||||
indent << "getGroup: " << param->getGroup() << std::endl <<
|
||||
indent << "getSex: " << param->getSex() << std::endl <<
|
||||
indent << "getMinWeight: " << param->getMinWeight() << std::endl <<
|
||||
indent << "getMaxWeight: " << param->getMaxWeight() << std::endl <<
|
||||
indent << "getDefaultWeight: " << param->getDefaultWeight() << std::endl <<
|
||||
indent << "getWeight: " << param->getWeight() << std::endl <<
|
||||
indent << "getCurrentWeight: " << param->getCurrentWeight() << std::endl <<
|
||||
indent << "getLastWeight: " << param->getLastWeight() << std::endl <<
|
||||
indent << "isAnimating: " << param->isAnimating() << std::endl <<
|
||||
indent << "isTweakable: " << param->isTweakable() << std::endl;
|
||||
}
|
||||
void LLPhysicsMotion::getString(std::ostringstream &oss)
|
||||
{
|
||||
oss <<
|
||||
" mParamDriverName: " << mParamDriverName << std::endl <<
|
||||
" mParamControllerName: " << mParamControllerName << std::endl <<
|
||||
" mMotionDirectionVec: " << mMotionDirectionVec << std::endl <<
|
||||
" mJointName: " << mJointName << std::endl <<
|
||||
" mPosition_local: " << mPosition_local << std::endl <<
|
||||
" mVelocityJoint_local: " << mVelocityJoint_local << std::endl <<
|
||||
" mAccelerationJoint_local: " << mAccelerationJoint_local << std::endl <<
|
||||
" mPositionLastUpdate_local: " << mPositionLastUpdate_local << std::endl <<
|
||||
" mPosition_world: " << mPosition_world << std::endl <<
|
||||
" mVelocity_local: " << mVelocity_local << std::endl;
|
||||
if(mParamDriver)
|
||||
{
|
||||
oss << " <DRIVER>" << std::endl;
|
||||
getParamString(2,mParamDriver,oss);
|
||||
LLDriverParam *driver_param = dynamic_cast<LLDriverParam *>(mParamDriver);
|
||||
if(driver_param)
|
||||
{
|
||||
for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin();
|
||||
iter != driver_param->mDriven.end();++iter)
|
||||
{
|
||||
oss << " <DRIVEN>" << std::endl;
|
||||
getParamString(3,iter->mParam,oss);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
oss << " mParamDriver: (NULL)" << std::endl;
|
||||
oss << " Controllers:" << std::endl;
|
||||
for(controller_map_t::const_iterator it = mParamControllers.begin(); it!= mParamControllers.end(); ++it)
|
||||
{
|
||||
oss << " mParamControllers[\"" << it->first << "\"] = \"" << it->second << "\" =" << mCharacter->getVisualParamWeight(it->first.c_str()) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
|
||||
LLMotion(id),
|
||||
mCharacter(NULL),
|
||||
mIsDefault(true)
|
||||
mCharacter(NULL)
|
||||
{
|
||||
mName = "breast_motion";
|
||||
}
|
||||
@@ -514,9 +434,9 @@ F32 LLPhysicsMotion::calculateVelocity_local()
|
||||
const LLVector3 position_world = joint->getWorldPosition();
|
||||
const LLVector3 last_position_world = mPosition_world;
|
||||
const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale;
|
||||
const LLVector3 velocity_world = positionchange_world;
|
||||
const F32 velocity_local = toLocal(velocity_world);
|
||||
return velocity_local;
|
||||
const LLVector3 velocity_world = positionchange_world;
|
||||
const F32 velocity_local = toLocal(velocity_world);
|
||||
return velocity_local;
|
||||
}
|
||||
|
||||
F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local)
|
||||
@@ -535,26 +455,11 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local)
|
||||
BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
// Skip if disabled globally.
|
||||
static const LLCachedControl<bool> avatar_physics("AvatarPhysics",false);
|
||||
bool physics_unsupported = !avatar_physics || (!((LLVOAvatar*)mCharacter)->isSelf() && !((LLVOAvatar*)mCharacter)->mSupportsPhysics);
|
||||
//Treat lod 0 as AvatarPhyiscs:FALSE. AvatarPhyiscs setting is superfluous unless we decide to hook it into param sending.
|
||||
if (physics_unsupported || !LLVOAvatar::sPhysicsLODFactor)
|
||||
if (!gSavedSettings.getBOOL("AvatarPhysics"))
|
||||
{
|
||||
if(!mIsDefault)
|
||||
{
|
||||
mIsDefault = true;
|
||||
for (motion_vec_t::iterator iter = mMotions.begin();iter != mMotions.end();++iter)
|
||||
{
|
||||
(*iter)->reset();
|
||||
}
|
||||
mCharacter->updateVisualParams();
|
||||
}
|
||||
((LLVOAvatar*)mCharacter)->idleUpdateBoobEffect(); //Emerald physics will fix params it altered if wearable physics are disabled.
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
mIsDefault = false;
|
||||
|
||||
BOOL update_visuals = FALSE;
|
||||
for (motion_vec_t::iterator iter = mMotions.begin();
|
||||
iter != mMotions.end();
|
||||
@@ -871,21 +776,3 @@ void LLPhysicsMotion::setParamValue(const LLViewerVisualParam *param,
|
||||
new_value_local,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
void LLPhysicsMotion::reset()
|
||||
{
|
||||
LLDriverParam *driver_param = dynamic_cast<LLDriverParam *>(mParamDriver);
|
||||
if (driver_param)
|
||||
{
|
||||
if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) &&
|
||||
(driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT))
|
||||
{
|
||||
mCharacter->setVisualParamWeight(driver_param,driver_param->getDefaultWeight());
|
||||
}
|
||||
for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin();
|
||||
iter != driver_param->mDriven.end();++iter)
|
||||
{
|
||||
mCharacter->setVisualParamWeight((*iter).mParam,(*iter).mParam->getDefaultWeight());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
#include "aistatemachine.h"
|
||||
#include "aithreadsafe.h"
|
||||
#include "lldrawpoolbump.h"
|
||||
#include "emeraldboobutils.h"
|
||||
#include "aicurl.h"
|
||||
#include "aihttptimeoutpolicy.h"
|
||||
|
||||
@@ -193,49 +192,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobMassChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.mass = EmeraldBoobUtils::convertMass((F32) newvalue.asReal());
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobHardnessChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.hardness = EmeraldBoobUtils::convertHardness((F32) newvalue.asReal());
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobVelMaxChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax((F32) newvalue.asReal());
|
||||
LLVOAvatar::sBoobConfig.velMin = LLVOAvatar::sBoobConfig.velMin*LLVOAvatar::sBoobConfig.velMax;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobFrictionChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.friction = EmeraldBoobUtils::convertFriction((F32) newvalue.asReal());
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobVelMinChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin((F32) newvalue.asReal())*LLVOAvatar::sBoobConfig.velMax;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobToggleChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.enabled = (BOOL) newvalue.asReal();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleAvatarBoobXYInfluence(const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::sBoobConfig.XYInfluence = (F32) newvalue.asReal();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleSetSelfInvisible( const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() );
|
||||
@@ -828,14 +784,6 @@ void settings_setup_listeners()
|
||||
gSavedSettings.getControl("CloudsEnabled")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _2));
|
||||
gSavedSettings.getControl("SkyUseClassicClouds")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _2));
|
||||
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
|
||||
|
||||
gSavedSettings.getControl("EmeraldBoobMass")->getSignal()->connect(boost::bind(&handleAvatarBoobMassChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobHardness")->getSignal()->connect(boost::bind(&handleAvatarBoobHardnessChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobVelMax")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMaxChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobFriction")->getSignal()->connect(boost::bind(&handleAvatarBoobFrictionChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobVelMin")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMinChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBreastPhysicsToggle")->getSignal()->connect(boost::bind(&handleAvatarBoobToggleChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobXYInfluence")->getSignal()->connect(boost::bind(&handleAvatarBoobXYInfluence, _2));
|
||||
|
||||
gSavedSettings.getControl("AscentAvatarXModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||
gSavedSettings.getControl("AscentAvatarYModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||
|
||||
@@ -206,9 +206,6 @@ const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;
|
||||
const F32 CHAT_FADE_TIME = 8.0;
|
||||
const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f;
|
||||
|
||||
const U32 EMERALD_BOOB_SIZE_PARAM = 105;
|
||||
const U32 EMERALD_BOOB_GRAVITY_PARAM = 507;
|
||||
|
||||
//Singu note: FADE and ALWAYS are swapped around from LL's source to match our preference panel.
|
||||
// Changing the "RenderName" order would cause confusion when 'always' setting suddenly gets
|
||||
// interpreted as 'fade', and vice versa.
|
||||
@@ -906,12 +903,10 @@ void SHClientTagMgr::clearAvatarTag(const LLVOAvatar* pAvatar)
|
||||
LLAvatarAppearanceDictionary *LLVOAvatar::sAvatarDictionary = NULL;
|
||||
S32 LLVOAvatar::sFreezeCounter = 0;
|
||||
U32 LLVOAvatar::sMaxVisible = 50;
|
||||
|
||||
F32 LLVOAvatar::sRenderDistance = 256.f;
|
||||
S32 LLVOAvatar::sNumVisibleAvatars = 0;
|
||||
S32 LLVOAvatar::sNumLODChangesThisFrame = 0;
|
||||
|
||||
|
||||
const LLUUID LLVOAvatar::sStepSoundOnLand("e8af4a28-aa83-4310-a7c4-c047e15ea0df");
|
||||
const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] =
|
||||
{
|
||||
@@ -946,9 +941,6 @@ F32 LLVOAvatar::sGreyUpdateTime = 0.f;
|
||||
//Move to LLVOAvatarSelf
|
||||
BOOL LLVOAvatar::sDebugAvatarRotation = FALSE;
|
||||
|
||||
//Custom stuff.
|
||||
EmeraldGlobalBoobConfig LLVOAvatar::sBoobConfig;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helper functions
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1008,8 +1000,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
mIsEditingAppearance(FALSE),
|
||||
mUseLocalAppearance(FALSE),
|
||||
mUseServerBakes(FALSE), // FIXME DRANO consider using boost::optional, defaulting to unknown.
|
||||
mFirstSetActualBoobGravRan( false ),
|
||||
mSupportsPhysics( false ),
|
||||
// <edit>
|
||||
mIdleMinute(0),
|
||||
mCCSChatTextOverride(false)
|
||||
@@ -1523,15 +1513,6 @@ void LLVOAvatar::initInstance(void)
|
||||
|
||||
LLAvatarAppearance::initInstance();
|
||||
|
||||
// grab the boob savedparams (prob a better place for this)
|
||||
sBoobConfig.mass = EmeraldBoobUtils::convertMass(gSavedSettings.getF32("EmeraldBoobMass"));
|
||||
sBoobConfig.hardness = EmeraldBoobUtils::convertHardness(gSavedSettings.getF32("EmeraldBoobHardness"));
|
||||
sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax(gSavedSettings.getF32("EmeraldBoobVelMax"));
|
||||
sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin(gSavedSettings.getF32("EmeraldBoobVelMin"))*sBoobConfig.velMax;
|
||||
sBoobConfig.friction = EmeraldBoobUtils::convertFriction(gSavedSettings.getF32("EmeraldBoobFriction"));
|
||||
sBoobConfig.enabled = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle");
|
||||
sBoobConfig.XYInfluence = gSavedSettings.getF32("EmeraldBoobXYInfluence");
|
||||
|
||||
if (gNoRender)
|
||||
{
|
||||
return;
|
||||
@@ -2173,7 +2154,7 @@ void LLVOAvatar::updateMeshData()
|
||||
U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
|
||||
void **user_data,
|
||||
U32 block_num, const EObjectUpdateType update_type,
|
||||
LLDataPacker *dp)
|
||||
LLDataPacker *dp)
|
||||
{
|
||||
const BOOL has_name = !getNVPair("FirstName");
|
||||
|
||||
@@ -2288,7 +2269,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
|
||||
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2367,7 +2348,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
idleUpdateAppearanceAnimation();
|
||||
if (detailed_update)
|
||||
{
|
||||
//idleUpdateBoobEffect();
|
||||
idleUpdateLipSync( voice_enabled );
|
||||
idleUpdateLoadingEffect();
|
||||
idleUpdateBelowWater(); // wind effect uses this
|
||||
@@ -2689,48 +2669,10 @@ F32 LLVOAvatar::calcMorphAmount()
|
||||
{
|
||||
morph_amt = (blend_frac - last_blend_frac) / (1.f - last_blend_frac);
|
||||
}
|
||||
|
||||
|
||||
return morph_amt;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Danny: ZOMG Boob Phsyics go!
|
||||
// ------------------------------------------------------------
|
||||
void LLVOAvatar::idleUpdateBoobEffect()
|
||||
{
|
||||
if(mFirstSetActualBoobGravRan)
|
||||
{
|
||||
// should probably be moved somewhere where it is only called when boobsize changes
|
||||
static const LLCachedControl<bool> avatar_physics("AvatarPhysics",false);
|
||||
|
||||
EmeraldBoobState newBoobState;
|
||||
|
||||
if(!avatar_physics || (!isSelf() && !mSupportsPhysics))
|
||||
{
|
||||
mLocalBoobConfig.boobSize = getVisualParam(EMERALD_BOOB_SIZE_PARAM)->getCurrentWeight();
|
||||
|
||||
EmeraldBoobInputs boobInputs;
|
||||
boobInputs.chestPosition = mChestp->getWorldPosition();
|
||||
boobInputs.chestRotation = mChestp->getWorldRotation();
|
||||
boobInputs.elapsedTime = mBoobBounceTimer.getElapsedTimeF32();
|
||||
|
||||
newBoobState = EmeraldBoobUtils::idleUpdate(sBoobConfig, mLocalBoobConfig, mBoobState, boobInputs);
|
||||
}
|
||||
|
||||
if(mBoobState.boobGrav != newBoobState.boobGrav)
|
||||
{
|
||||
LLVisualParam *param = getVisualParam(EMERALD_BOOB_GRAVITY_PARAM);
|
||||
|
||||
param->stopAnimating(FALSE);
|
||||
param->setWeight(llclamp(newBoobState.boobGrav+getActualBoobGrav(), -1.5f, 2.f), FALSE);
|
||||
param->apply(getSex());
|
||||
updateVisualParams();
|
||||
}
|
||||
|
||||
mBoobState = newBoobState;
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
|
||||
{
|
||||
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
|
||||
@@ -3200,7 +3142,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
||||
// LLFontGL::getFontSansSerifSmall());
|
||||
}
|
||||
|
||||
// static LLICachedControl<bool> show_display_names("NameTagShowDisplayNames");
|
||||
// static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames");
|
||||
// static LLUICachedControl<bool> show_usernames("NameTagShowUsernames");
|
||||
|
||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
||||
@@ -3409,8 +3351,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
||||
{
|
||||
// ...not using chat bubbles, just names
|
||||
mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_CENTER);
|
||||
mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
|
||||
mNameText->setVisibleOffScreen(FALSE);
|
||||
mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
|
||||
mNameText->setVisibleOffScreen(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3433,8 +3375,8 @@ void LLVOAvatar::clearNameTag()
|
||||
{
|
||||
mNameString.clear();
|
||||
if (mNameText)
|
||||
{
|
||||
mNameText->setLabel("");
|
||||
{
|
||||
mNameText->setLabel("");
|
||||
mNameText->setString( "" );
|
||||
}
|
||||
}
|
||||
@@ -3460,7 +3402,7 @@ void LLVOAvatar::invalidateNameTags()
|
||||
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*it);
|
||||
if (!avatar) continue;
|
||||
if (avatar->isDead()) continue;
|
||||
|
||||
|
||||
avatar->clearNameTag();
|
||||
|
||||
}
|
||||
@@ -3642,13 +3584,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
||||
{
|
||||
output = llformat("%s - %d",
|
||||
motionp->getID().asString().c_str(),
|
||||
(U32)motionp->getPriority());
|
||||
(U32)motionp->getPriority());
|
||||
}
|
||||
else
|
||||
{
|
||||
output = llformat("%s - %d",
|
||||
motionp->getName().c_str(),
|
||||
(U32)motionp->getPriority());
|
||||
motionp->getName().c_str(),
|
||||
(U32)motionp->getPriority());
|
||||
}
|
||||
addDebugText(output);
|
||||
}
|
||||
@@ -3818,7 +3760,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
||||
|
||||
resolveHeightGlobal(root_pos, ground_under_pelvis, normal);
|
||||
F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]);
|
||||
BOOL in_air = ( (!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) ||
|
||||
BOOL in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) ||
|
||||
foot_to_ground > FOOT_GROUND_COLLISION_TOLERANCE);
|
||||
|
||||
if (in_air && !mInAir)
|
||||
@@ -3836,7 +3778,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
||||
if (newPosition != mRoot->getXform()->getWorldPosition())
|
||||
{
|
||||
mRoot->touch();
|
||||
mRoot->setWorldPosition(newPosition ); // regular update
|
||||
mRoot->setWorldPosition( newPosition ); // regular update
|
||||
}
|
||||
|
||||
|
||||
@@ -4212,7 +4154,7 @@ void LLVOAvatar::updateVisibility()
|
||||
|
||||
if(isSelf())
|
||||
{
|
||||
if( !gAgentWearables.areWearablesLoaded())
|
||||
if (!gAgentWearables.areWearablesLoaded())
|
||||
{
|
||||
visible = FALSE;
|
||||
}
|
||||
@@ -4353,11 +4295,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
|
||||
{ //LOD changed or new mesh created, allocate new vertex buffer if needed
|
||||
if (needs_rebuild || mDirtyMesh >= 2 || mVisibilityRank <= 4)
|
||||
{
|
||||
updateMeshData();
|
||||
updateMeshData();
|
||||
mDirtyMesh = 0;
|
||||
mNeedsSkin = TRUE;
|
||||
mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
|
||||
}
|
||||
mNeedsSkin = TRUE;
|
||||
mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) <= 0)
|
||||
@@ -4985,7 +4927,7 @@ void LLVOAvatar::updateTextures()
|
||||
layer_baked.push_back(isTextureDefined(mBakedTextureDatas[i].mTextureIndex));
|
||||
// bind the texture so that they'll be decoded slightly
|
||||
// inefficient, we can short-circuit this if we have to
|
||||
if( render_avatar && !gGLManager.mIsDisabled )
|
||||
if (render_avatar && !gGLManager.mIsDisabled)
|
||||
{
|
||||
if (layer_baked[i] && !mBakedTextureDatas[i].mIsLoaded)
|
||||
{
|
||||
@@ -5150,7 +5092,7 @@ void LLVOAvatar::checkTextureLoading()
|
||||
}
|
||||
|
||||
const F32 SELF_ADDITIONAL_PRI = 0.75f ;
|
||||
const F32 ADDITIONAL_PRI = 0.5f;
|
||||
const F32 ADDITIONAL_PRI = 0.5f;
|
||||
void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level)
|
||||
{
|
||||
//Note:
|
||||
@@ -6544,7 +6486,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
|
||||
gAgentCamera.changeCameraToMouselook();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mDrawable.isNull() || sit_object->mDrawable.isNull())
|
||||
{
|
||||
return;
|
||||
@@ -8032,7 +7974,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
||||
&& baked_index != BAKED_SKIRT)
|
||||
{
|
||||
setTEImage(mBakedTextureDatas[baked_index].mTextureIndex,
|
||||
LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
|
||||
LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8053,8 +7995,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
||||
setCompositeUpdatesEnabled( FALSE );
|
||||
gPipeline.markGLRebuild(this);
|
||||
|
||||
mSupportsPhysics = false;
|
||||
|
||||
// Apply visual params
|
||||
if( num_params > 1)
|
||||
{
|
||||
@@ -8062,20 +8002,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
||||
BOOL params_changed = FALSE;
|
||||
BOOL interp_params = FALSE;
|
||||
|
||||
for( S32 i = 0; i < num_params; i++ )
|
||||
for( S32 i = 0; i < num_params; i++ )
|
||||
{
|
||||
LLVisualParam* param = contents.mParams[i];
|
||||
F32 newWeight = contents.mParamWeights[i];
|
||||
|
||||
if(param->getID() == 10000)
|
||||
{
|
||||
mSupportsPhysics = true;
|
||||
}
|
||||
else if(param->getID() == EMERALD_BOOB_GRAVITY_PARAM && newWeight != getActualBoobGrav())
|
||||
{
|
||||
setActualBoobGrav(newWeight);
|
||||
}
|
||||
|
||||
if (is_first_appearance_message || (param->getWeight() != newWeight))
|
||||
{
|
||||
params_changed = TRUE;
|
||||
@@ -8290,7 +8221,7 @@ void LLVOAvatar::onBakedTextureLoaded(BOOL success,
|
||||
LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src,
|
||||
S32 discard_level, BOOL final, void* userdata)
|
||||
{
|
||||
//llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl;
|
||||
// llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl;
|
||||
|
||||
LLUUID id = src_vi->getID();
|
||||
LLUUID *avatar_idp = (LLUUID *)userdata;
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include "material_codes.h" // LL_MCODE_END
|
||||
#include "llviewerstats.h"
|
||||
|
||||
#include "emeraldboobutils.h"
|
||||
#include "llavatarname.h"
|
||||
|
||||
extern const LLUUID ANIM_AGENT_BODY_NOISE;
|
||||
@@ -292,7 +291,6 @@ public:
|
||||
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
|
||||
void idleUpdateRenderCost();
|
||||
void idleUpdateBelowWater();
|
||||
void idleUpdateBoobEffect(); //Emerald
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Static preferences (controlled by user settings/menus)
|
||||
@@ -871,30 +869,6 @@ private:
|
||||
BOOL mStepOnLand;
|
||||
U8 mStepMaterial;
|
||||
LLVector3 mStepObjectVelocity;
|
||||
|
||||
public:
|
||||
bool mSupportsPhysics; //Client supports v2 wearable physics. Disable emerald physics.
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Emerald legacy boob bounce
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
F32 getActualBoobGrav() const { return mLocalBoobConfig.actualBoobGrav; }
|
||||
void setActualBoobGrav(F32 grav)
|
||||
{
|
||||
mLocalBoobConfig.actualBoobGrav = grav;
|
||||
if(!mFirstSetActualBoobGravRan)
|
||||
{
|
||||
mBoobState.boobGrav = grav;
|
||||
mFirstSetActualBoobGravRan = true;
|
||||
}
|
||||
}
|
||||
static EmeraldGlobalBoobConfig sBoobConfig;
|
||||
private:
|
||||
bool mFirstSetActualBoobGravRan;
|
||||
LLFrameTimer mBoobBounceTimer;
|
||||
EmeraldAvatarLocalBoobConfig mLocalBoobConfig;
|
||||
EmeraldBoobState mBoobState;
|
||||
|
||||
/** Physics
|
||||
** **
|
||||
@@ -1091,6 +1065,4 @@ private:
|
||||
extern const F32 SELF_ADDITIONAL_PRI;
|
||||
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
|
||||
|
||||
extern const U32 EMERALD_BOOB_SIZE_PARAM; //"Breast Size"
|
||||
extern const U32 EMERALD_BOOB_GRAVITY_PARAM; //"Breast_Gravity"
|
||||
#endif // LL_VOAVATAR_H
|
||||
|
||||
@@ -651,11 +651,6 @@ BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight
|
||||
}
|
||||
}
|
||||
|
||||
if(param->getID() == EMERALD_BOOB_GRAVITY_PARAM && weight != getActualBoobGrav())
|
||||
{
|
||||
setActualBoobGrav(weight);
|
||||
}
|
||||
|
||||
return LLCharacter::setVisualParamWeight(param,weight,upload_bake);
|
||||
}
|
||||
|
||||
|
||||
@@ -7495,29 +7495,6 @@ You locally updated a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME]
|
||||
For instructions, make a new template in the AO. Use the toolbar to toggle the AO on/off.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="FirstPhysicsWearable"
|
||||
priority="high"
|
||||
type="notify">
|
||||
By wearing a Physics Wearable certain server behavior will be enabled that many older viewers are incompatable with. On such viewers you may display incorrectly (often as 'Ruth').
|
||||
|
||||
If you wish to keep compatability with old viewers then you must not wear a Physics Wearable during your session. If you have already worn one during this session remove it and reconnect.
|
||||
|
||||
Click 'Wear' to attach the Physics Wearable, or click 'Cancel' if you wish to maintain compatability with legacy clients.
|
||||
<unique/>
|
||||
<form name="form">
|
||||
<button
|
||||
index="0"
|
||||
name="Wear"
|
||||
text="Wear"/>
|
||||
<button
|
||||
index="1"
|
||||
name="Cancel"
|
||||
text="Cancel"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="SGIncompleteAppearance"
|
||||
|
||||
@@ -51,12 +51,6 @@
|
||||
<!--check_box bottom_delta="0" control_name="ColorCustomChat" follows="top" height="20" label="" left_delta="54" name="color_custom_check" width="44" tool_tip="Color Custom Chat"/ Not implemented, yet.-->
|
||||
</panel>
|
||||
<panel border="true" left="1" bottom="-190" height="180" width="500" label="Body Dynamics" name="Body Dynamics">
|
||||
<check_box bottom_delta="-25" follows="top" height="16" label="Enable enhanced physics on avatar breasts" left="10" name="EmBreastsToggle" control_name="EmeraldBreastPhysicsToggle" tool_tip="You must hit apply before these controls will activate or deactivate"/>
|
||||
<slider bottom_delta="-20" left="10" name="EmeraldBoobMass" control_name="EmeraldBoobMass" decimal_digits="0" follows="top" height="18" increment="1" label="Breast mass:" label_width="100" max_val="100" min_val="1" can_edit_text="true" width="250"/>
|
||||
<slider bottom_delta="-20" left_delta="0" name="EmeraldBoobHardness" control_name="EmeraldBoobHardness" decimal_digits="0" follows="top" height="18" increment="1" label="Breast rebound:" label_width="100" max_val="100" min_val="1" can_edit_text="true" width="250"/>
|
||||
<slider bottom_delta="-20" name="EmeraldBoobVelMax" control_name="EmeraldBoobVelMax" decimal_digits="0" follows="top" height="18" increment="1" label="Breast max vel:" label_width="100" max_val="100" min_val="1" can_edit_text="true" width="250"/>
|
||||
<slider bottom_delta="-20" name="EmeraldBoobFriction" control_name="EmeraldBoobFriction" decimal_digits="0" follows="top" height="18" increment="1" label="Breast friction:" label_width="100" max_val="100" min_val="1" can_edit_text="true" width="250"/>
|
||||
<slider bottom_delta="-20" name="EmeraldBoobVelMin" control_name="EmeraldBoobVelMin" decimal_digits="0" follows="top" height="18" increment="1" label="Breast min vel:" label_width="100" max_val="100" min_val="1" can_edit_text="true" width="250"/>
|
||||
<text bottom_delta="-20" height="15" left="10" name="av_mod_textbox" follows="top">Avatar Offset Modifiers</text>
|
||||
<spinner bottom_delta="-20" decimal_digits="5" follows="top" height="16" increment="0.05" label="X Modifier" label_width="65" left_delta="5" max_val="0.15" min_val="-0.15" name="X Modifier" width="128" control_name="AscentAvatarXModifier" tool_tip="Use this to manipulate, to a degree, your avatar bounding box. This can be used to distort orbiters, or to raise you up or down without altering your shape."/>
|
||||
<spinner bottom_delta="-20" decimal_digits="5" follows="top" height="16" increment="0.05" label="Y Modifier" label_width="65" max_val="0.20" min_val="-0.20" name="Y Modifier" width="128" control_name="AscentAvatarYModifier" tool_tip="Use this to manipulate, to a degree, your avatar bounding box. This can be used to distort orbiters, or to raise you up or down without altering your shape."/>
|
||||
|
||||
Reference in New Issue
Block a user