Conflicts:
	indra/newview/llvoavatar.cpp
This commit is contained in:
phr0z3nt04st
2010-05-10 16:02:48 -05:00
15 changed files with 171 additions and 74 deletions

1
.gitignore vendored
View File

@@ -9,3 +9,4 @@
*.pyc
*.orig
*.rej
/edited-files.txt

View File

@@ -513,6 +513,14 @@ U8 LLMaterialTable::getMCode(const std::string& name)
}
}
// <edit>
if(name.find("MCode") == 0)
{
S32 s;
sscanf(name.c_str(), "MCode%d", &s);
return U8(s);
}
// </edit>
return 0;
}
@@ -530,7 +538,10 @@ std::string LLMaterialTable::getName(U8 mcode)
}
}
return NULL;
// <edit>
//return NULL;
return llformat("MCode%d", mcode);
// </edit>
}

View File

@@ -709,7 +709,7 @@
<string>http://www.secondlife.com</string>
</map>
<key>BlockAvatarAppearanceMessages</key>
<map>
<map>
<key>Comment</key>
<string>Ignore's appearance messages (for simulating Ruth)</string>
<key>Persist</key>
@@ -718,7 +718,18 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
<key>BroadcastViewerEffects</key>
<map>
<key>Comment</key>
<string>Broadcast Viewer Effects</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>BrowserProxyAddress</key>
<map>
<key>Comment</key>
@@ -4241,17 +4252,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>RadarChatKeysChannel</key>
<map>
<key>Comment</key>
<string>Private channel used to broadcast the key of incoming avatars</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>-8888888</integer>
</map>
<key>FloaterLandRect5</key>
<map>
<key>Comment</key>

View File

@@ -68,6 +68,7 @@ private:
BOOL mEnableLLWind;
BOOL mEnableClouds;
BOOL mInitialEnableClouds;
BOOL mBroadcastViewerEffects;
U32 mSpeedRezInterval;
U32 mLinksForChattingObjects;
U32 mTimeFormat;
@@ -120,6 +121,7 @@ void LLPrefsInertImpl::refreshValues()
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mEnableLLWind = gSavedSettings.getBOOL("WindEnabled");
mEnableClouds = gSavedSettings.getBOOL("CloudsEnabled");
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
}
void LLPrefsInertImpl::refresh()
@@ -193,6 +195,8 @@ void LLPrefsInertImpl::cancel()
gSavedSettings.setU32("LinksForChattingObjects", mLinksForChattingObjects);
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
gSavedSettings.setBOOL("WindEnabled", mEnableLLWind);
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
gLLWindEnabled = mEnableLLWind;
if(mInitialEnableClouds != gSavedSettings.getBOOL("CloudsEnabled"))

View File

@@ -68,21 +68,6 @@ typedef enum e_radar_alert_type
ALERT_TYPE_CHATRANGE = 3
} ERadarAlertType;
void announce(std::string msg)
{
//llinfos << "Radar broadcasting key: " << key.asString() << " - on channel " << gSavedSettings.getS32("RadarChatKeysChannel") << llendl;
gMessageSystem->newMessage("ScriptDialogReply");
gMessageSystem->nextBlock("AgentData");
gMessageSystem->addUUID("AgentID", gAgent.getID());
gMessageSystem->addUUID("SessionID", gAgent.getSessionID());
gMessageSystem->nextBlock("Data");
gMessageSystem->addUUID("ObjectID", gAgent.getID());
gMessageSystem->addS32("ChatChannel", gSavedSettings.getS32("RadarChatKeysChannel"));
gMessageSystem->addS32("ButtonIndex", 1);
gMessageSystem->addString("ButtonLabel", msg);
gAgent.sendReliableMessage();
}
void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering)
{
if (gSavedSettings.getBOOL("RadarChatAlerts"))
@@ -121,10 +106,6 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool
LLFloaterChat::addChat(chat);
}
}
if (type == ALERT_TYPE_SIM && entering && gSavedSettings.getBOOL("RadarChatKeys"))
{
announce(key.asString());
}
}
LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) :
@@ -1052,20 +1033,7 @@ void LLFloaterAvatarList::onClickGetKey(void *userdata)
void LLFloaterAvatarList::onClickSendKeys(void *userdata)
{
LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
LLAvatarListEntry *entry;
if (self->mAvatars.size() == 0)
return;
for (iter = self->mAvatars.begin(); iter != self->mAvatars.end(); iter++)
{
entry = &iter->second;
if (!entry->isDead() && entry->isInSim())
announce(entry->getID().asString());
}
//TODO remove
}
static void send_freeze(const LLUUID& avatar_id, bool freeze)

View File

@@ -71,11 +71,12 @@
BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
{
if (object && target_type != LOOKAT_TARGET_NONE && gSavedSettings.getBOOL("PrivateLookAt"))
if(gSavedSettings.getBOOL("PrivateLookAt"))
{
target_type = LOOKAT_TARGET_NONE;
object = mAvatarObject;
if(!mLookAt || mLookAt->isDead())
return FALSE;
position.clearVec();
return mLookAt->setLookAt(LOOKAT_TARGET_NONE, mAvatarObject, position);
}
if(object && object->isAttachment())
@@ -104,18 +105,11 @@ BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVecto
BOOL LLAgent::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
// disallow pointing at attachments and avatars
if (object && (object->isAttachment() || object->isAvatar()))
if (object && (object->isAttachment() || object->isAvatar()) || gSavedSettings.getBOOL("PrivateLookAt"))
{
return FALSE;
}
if (object && target_type != POINTAT_TARGET_NONE && gSavedSettings.getBOOL("PrivateLookAt"))
{
target_type = POINTAT_TARGET_NONE;
object = NULL;
position.clearVec();
}
if(!mPointAt || mPointAt->isDead())
{
mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT);

View File

@@ -47,6 +47,12 @@
#include "llxmltree.h"
// <edit>
#include "llresmgr.h"
#include "llhudrender.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
// </edit>
BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE;
@@ -498,6 +504,8 @@ void LLHUDEffectLookAt::setSourceObject(LLViewerObject* objectp)
//-----------------------------------------------------------------------------
void LLHUDEffectLookAt::render()
{
if (gSavedSettings.getBOOL("PrivateLookAt") &&
(gAgent.getAvatarObject() == ((LLVOAvatar*)(LLViewerObject*)mSourceObject))) return;
if (sDebugLookAt && mSourceObject.notNull())
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -521,6 +529,34 @@ void LLHUDEffectLookAt::render()
gGL.vertex3f(0.f, 0.f, 1.f);
} gGL.end();
gGL.popMatrix();
// <edit>
const std::string text = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->getFullname();
LLVector3 offset = gAgent.getCameraPositionAgent() - target;
offset.normalize();
LLVector3 shadow_offset = offset * 0.49f;
offset *= 0.5f;
const LLFontGL* font = LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF);
LLGLEnable gl_blend(GL_BLEND);
glPushMatrix();
gViewerWindow->setupViewport();
hud_render_utf8text(text,
target + shadow_offset,
*font,
LLFontGL::NORMAL,
-0.5f * font->getWidthF32(text) + 2.0f,
-2.0f,
LLColor4::black,
FALSE);
hud_render_utf8text(text,
target + offset,
*font,
LLFontGL::NORMAL,
-0.5f * font->getWidthF32(text),
0.0f,
(*mAttentions)[mTargetType].mColor,
FALSE);
glPopMatrix();
// </edit>
}
}

View File

@@ -79,6 +79,7 @@ void LLHUDManager::updateEffects()
void LLHUDManager::sendEffects()
{
if(!gSavedSettings.getBOOL("BroadcastViewerEffects"))return;
S32 i;
for (i = 0; i < mHUDEffects.count(); i++)
{

View File

@@ -4011,7 +4011,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
else
{
LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachCustom");
new_item->addListener(callback, "on_click", NULL);
new_item->addListener(callback, "on_click", LLSD());
}
// </edit>
}

View File

@@ -383,9 +383,15 @@ void LLPanelFace::getState()
if( objectp
&& objectp->getPCode() == LL_PCODE_VOLUME
&& objectp->permModify())
{
BOOL editable = objectp->permModify();
// <edit>
//&& objectp->permModify())
)
// </edit>
{
// <edit>
//BOOL editable = objectp->permModify();
BOOL editable = TRUE;
// </edit>
// only turn on auto-adjust button if there is a media renderer and the media is loaded
childSetEnabled("textbox autofix",FALSE);

View File

@@ -164,6 +164,8 @@ BOOL LLPanelObject::postBuild()
mComboMaterial = getChild<LLComboBox>("material");
childSetCommitCallback("material",onCommitMaterial,this);
mComboMaterial->removeall();
// <edit>
/*
// *TODO:translate
for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin();
iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter)
@@ -174,6 +176,12 @@ BOOL LLPanelObject::postBuild()
mComboMaterial->add(minfop->mName);
}
}
*/
for(U8 mcode = 0; mcode < 0x10; mcode++)
{
mComboMaterial->add(LLMaterialTable::basic.getName(mcode));
}
// </edit>
mComboMaterialItemCount = mComboMaterial->getItemCount();
// Base Type
@@ -362,9 +370,19 @@ void LLPanelObject::getState( )
}
// can move or rotate only linked group with move permissions, or sub-object with move and modify perms
// <edit>
// Enables position, size, and rotation textboxes
// but they're also editable
// No arrow crap though
/*
BOOL enable_move = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_scale = objectp->permMove() && objectp->permModify();
BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
*/
BOOL enable_move = TRUE;
BOOL enable_scale = TRUE;
BOOL enable_rotate = TRUE;
// </edit>
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
@@ -449,7 +467,15 @@ void LLPanelObject::getState( )
// BUG? Check for all objects being editable?
S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
BOOL editable = root_objectp->permModify();
// <edit>
// Makes status and material available
// I would like it if they were semi-gray, you could copy the value,
// but not editable
//BOOL editable = root_objectp->permModify();
BOOL editable = TRUE;
// </edit>
// Select Single Message
childSetVisible("select_single", FALSE);
@@ -535,6 +561,8 @@ void LLPanelObject::getState( )
{
mComboMaterial->setEnabled( TRUE );
mLabelMaterial->setEnabled( TRUE );
// <edit>
/*
if (material_code == LL_MCODE_LIGHT)
{
if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
@@ -552,6 +580,9 @@ void LLPanelObject::getState( )
// *TODO:Translate
mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
}
*/
mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
// </edit>
}
else
{
@@ -721,8 +752,11 @@ void LLPanelObject::getState( )
// Cut interpretation varies based on base object type
F32 cut_begin, cut_end, adv_cut_begin, adv_cut_end;
if ( selected_item == MI_SPHERE || selected_item == MI_TORUS ||
selected_item == MI_TUBE || selected_item == MI_RING )
// <edit>
//if ( selected_item == MI_SPHERE || selected_item == MI_TORUS ||
// selected_item == MI_TUBE || selected_item == MI_RING )
if(!linear_path)
// </edit>
{
cut_begin = begin_t;
cut_end = end_t;
@@ -746,7 +780,10 @@ void LLPanelObject::getState( )
F32 twist = volume_params.getTwist();
F32 twist_begin = volume_params.getTwistBegin();
// Check the path type for conversion.
if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE)
// <edit>
//if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE)
if(linear_path)
// </edit>
{
twist *= OBJECT_TWIST_LINEAR_MAX;
twist_begin *= OBJECT_TWIST_LINEAR_MAX;
@@ -839,7 +876,11 @@ void LLPanelObject::getState( )
BOOL top_shear_x_visible = TRUE;
BOOL top_shear_y_visible = TRUE;
BOOL twist_visible = TRUE;
BOOL advanced_cut_visible = FALSE;
// <edit>
// Enable advanced cut (aka dimple, aka path, aka profile cut) for everything
//BOOL advanced_cut_visible = FALSE;
BOOL advanced_cut_visible = TRUE;
// </edit>
BOOL taper_visible = FALSE;
BOOL skew_visible = FALSE;
BOOL radius_offset_visible = FALSE;
@@ -1423,8 +1464,13 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
F32 begin_s, end_s;
F32 begin_t, end_t;
if (selected_type == MI_SPHERE || selected_type == MI_TORUS ||
selected_type == MI_TUBE || selected_type == MI_RING)
// <edit>
//if (selected_type == MI_SPHERE || selected_type == MI_TORUS ||
// selected_type == MI_TUBE || selected_type == MI_RING)
BOOL linear_path = (path == LL_PCODE_PATH_LINE) ||
(path == LL_PCODE_PATH_FLEXIBLE);
if(!linear_path)
// </edit>
{
begin_s = adv_cut_begin;
end_s = adv_cut_end;
@@ -1695,7 +1741,10 @@ void LLPanelObject::sendPosition(BOOL btn_down)
// Clamp the Z height
const F32 height = newpos.mV[VZ];
const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject);
const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
// <edit>
//const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
const F32 max_height = F32(340282346638528859811704183484516925440.0f);
// </edit>
if (!mObject->isAttachment())
{

View File

@@ -335,7 +335,10 @@ void LLPreviewTexture::draw()
// virtual
BOOL LLPreviewTexture::canSaveAs() const
{
return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
// <edit>
//return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
return !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
// </edit>
}
@@ -361,7 +364,10 @@ void LLPreviewTexture::saveAs()
}
mLoadingFullImage = TRUE;
getWindow()->incBusyCount();
mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
// <edit>
//mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
mImage->setLoadedCallbackNoAux( LLPreviewTexture::onFileLoadedForSave,
// </edit>
0, TRUE, FALSE, new LLUUID( mItemUUID ) );
}
@@ -424,6 +430,18 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
}
}
// <edit>
// virtual
LLUUID LLPreviewTexture::getItemID()
{
const LLViewerInventoryItem* item = getItem();
if(item)
{
return item->getUUID();
}
return LLUUID::null;
}
// </edit>
// It takes a while until we get height and width information.
// When we receive it, reshape the window accordingly.

View File

@@ -63,6 +63,9 @@ public:
virtual BOOL canSaveAs() const;
virtual void saveAs();
// <edit>
virtual LLUUID getItemID();
// </edit>
virtual void loadAsset();
virtual EAssetStatus getAssetStatus();

View File

@@ -1577,7 +1577,8 @@ void LLVOAvatar::getSpatialExtents(LLVector3& newMin, LLVector3& newMax)
//-----------------------------------------------------------------------------
void LLVOAvatar::renderCollisionVolumes()
{
LLGLDepthTest gls_depth(GL_FALSE);
//BLATANTLY STOLEN FROM SIMMAN DURRR
LLGLDepthTest gls_depth(GL_FALSE); //make it so the skeleton shows through the mesh and prims (good for milfags)
for (S32 i = 0; i < mNumCollisionVolumes; i++)
{
mCollisionVolumes[i].renderCollision();

View File

@@ -125,6 +125,11 @@
label="Preview animations on the avatar instead on a dummy before uploading" left="10"
mouse_opaque="true" name="preview_anim_in_world_check" radio_style="false"
width="400" />
<check_box bottom_delta="-20" control_name="BroadcastViewerEffects" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Broadcast Viewer Effects" left="10"
mouse_opaque="true" name="broadcast_viewer_effects" radio_style="false"
width="400" />
<check_box bottom_delta="-20" control_name="PrivateLookAt" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
label="Do not look at or point to objects (defeats ShowLookAt)" left="10"
@@ -136,7 +141,7 @@
mouse_opaque="true" name="revoke_perms_on_stand_up_check" radio_style="false"
width="400" />
<check_box bottom_delta="-20" control_name="SaveScriptsAsMono" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Save scripts in inventory as Mono scripts instead of LSL2" left="10"
mouse_opaque="true" name="save_scripts_as_mono_check" radio_style="false"
width="400" />