Merge branch 'master' of github.com:Beeks/Ascent

Conflicts:
	indra/newview/app_settings/settings.xml
This commit is contained in:
Beeks
2010-09-02 03:29:02 -04:00
5 changed files with 132 additions and 106 deletions

View File

@@ -37,36 +37,36 @@
</map>
<key>AscentBuildAlwaysEnabled</key>
<map>
<key>Comment</key>
<string>Show build option regardless of whether you can (May not mean you can actually build there)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<key>Comment</key>
<string>Show build option regardless of whether you can (May not mean you can actually build there)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentDisableMinZoomDist</key>
<map>
<key>Comment</key>
<string>Allows much closer camera zooming.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<key>Comment</key>
<string>Allows much closer camera zooming.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentFlyAlwaysEnabled</key>
<map>
<key>Comment</key>
<string>Always allow fly (Does actually always allow flight)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<key>Comment</key>
<string>Always allow fly (Does actually always allow flight)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentDisplayTotalScriptJumps</key>
<map>
@@ -90,8 +90,8 @@
<key>Value</key>
<real>100</real>
</map>
<key>Ascentnumscripts</key>
<map>
<key>Ascentnumscripts</key>
<map>
<key>Comment</key>
<string>temp..</string>
<key>Persist</key>
@@ -100,7 +100,7 @@
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
</map>
<key>AscentBuildPrefs_ActualRoot</key>
<map>
<key>Comment</key>

View File

@@ -1971,7 +1971,7 @@ void LLAgent::cameraOrbitIn(const F32 meters)
mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist;
if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
if (!LLAppViewer::sFreezeTime && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
{
// No need to animate, camera is already there.
changeCameraToMouselook(FALSE);
@@ -1985,13 +1985,48 @@ void LLAgent::cameraOrbitIn(const F32 meters)
LLVector3d camera_offset_unit(mCameraFocusOffsetTarget);
F32 current_distance = (F32)camera_offset_unit.normalize();
F32 new_distance = current_distance - meters;
/*
F32 min_zoom = LAND_MIN_ZOOM;
// Don't move through focus point
if (mFocusObject.notNull())
{
if (mFocusObject->isAvatar())
{
min_zoom = AVATAR_MIN_ZOOM;
}
else
{
min_zoom = OBJECT_MIN_ZOOM;
}
}
new_distance = llmax(new_distance, min_zoom);
// Don't zoom too far back
const F32 DIST_FUDGE = 16.f; // meters
F32 max_distance = llmin(mDrawDistance - DIST_FUDGE,
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE );
if (new_distance > max_distance)
{
// Unless camera is unlocked
if (!gSavedSettings.getBOOL("DisableCameraConstraints"))
{
return;
}
}
if( CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode() )
{
new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
}
*/
// Compute new camera offset
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
cameraZoomIn(1.f);
}
}
//-----------------------------------------------------------------------------
// cameraPanIn()
//-----------------------------------------------------------------------------
@@ -3876,55 +3911,6 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
camera_position_global = focusPosGlobal + mCameraFocusOffset;
}
if (!gSavedSettings.getBOOL("DisableCameraConstraints") && !gAgent.isGodlike())
{
LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(
camera_position_global);
bool constrain = true;
if(regionp && regionp->canManageEstate())
{
constrain = false;
}
if(constrain)
{
F32 max_dist = ( CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode ) ?
APPEARANCE_MAX_ZOOM : mDrawDistance;
LLVector3d camera_offset = camera_position_global
- gAgent.getPositionGlobal();
F32 camera_distance = (F32)camera_offset.magVec();
if(camera_distance > max_dist)
{
camera_position_global = gAgent.getPositionGlobal() +
(max_dist / camera_distance) * camera_offset;
isConstrained = TRUE;
}
}
// JC - Could constrain camera based on parcel stuff here.
// LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global);
//
// if (regionp && !regionp->mParcelOverlay->isBuildCameraAllowed(regionp->getPosRegionFromGlobal(camera_position_global)))
// {
// camera_position_global = last_position_global;
//
// isConstrained = TRUE;
// }
}
// Don't let camera go underground
F32 camera_min_off_ground = getCameraMinOffGround();
camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global);
if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground)
{
camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground;
isConstrained = TRUE;
}
if (hit_limit)
{
*hit_limit = isConstrained;

View File

@@ -3440,53 +3440,50 @@ void handle_close_all_notifications(void*)
// The following animations were made by Charley Levenque and are
// not public property or free to use via UUID. When replicating
// this code, please supply your own animations.
void set_current_pose(std::string anim)
{
if (current_pose == LLUUID::null)
gSavedSettings.setF32("AscentAvatarZModifier", gSavedSettings.getF32("AscentAvatarZModifier") + 7.5);
gAgent.sendAgentSetAppearance();
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set(anim);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
}
void handle_pose_stand_ltao(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("6c082c7b-f70e-9da0-0451-54793f869ff4");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("6c082c7b-f70e-9da0-0451-54793f869ff4");
}
void handle_pose_stand_ltah(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("45e59c14-913b-c58c-2a55-c0a5c1eeef53");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("45e59c14-913b-c58c-2a55-c0a5c1eeef53");
}
void handle_pose_stand_ltad(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("421d6bb4-94a9-3c42-4593-f2bc1f6a26e6");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("421d6bb4-94a9-3c42-4593-f2bc1f6a26e6");
}
void handle_pose_stand_loau(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("8b3bb239-d610-1c0f-4d1a-69d29bc17e2c");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("8b3bb239-d610-1c0f-4d1a-69d29bc17e2c");
}
void handle_pose_stand_loao(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("4d70e328-48b6-dc6a-0be1-85dd6b333e81");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("4d70e328-48b6-dc6a-0be1-85dd6b333e81");
}
void handle_pose_stand_lhao(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 5.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose.set("f088eaf0-f1c9-8cf1-99c8-09df96bb13ae");
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
set_current_pose("f088eaf0-f1c9-8cf1-99c8-09df96bb13ae");
}
void handle_pose_stand_stop(void*)
{
gSavedSettings.setF32("AscentAvatarZModifier", 0.0);
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose = LLUUID::null;
if (current_pose != LLUUID::null)
{
gSavedSettings.setF32("AscentAvatarZModifier", gSavedSettings.getF32("AscentAvatarZModifier") - 7.5);
gAgent.sendAgentSetAppearance();
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
current_pose = LLUUID::null;
}
}
// </dogmode> ---------------------------------------------------

View File

@@ -372,6 +372,31 @@
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="Building" name="Building">
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-25" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall"
h_pad="0" halign="left" height="10" left_delta="30" mouse_opaque="false"
name="text_box6" v_pad="0" width="150"> Pivot Point</text>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.05"
label="X pos" label_width="40" left="10" mouse_opaque="true" max_val="256"
min_val="-256" name="X pos" width="120" control_name="AscentBuildPrefs_PivotX"/>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.05"
label="Y pos" label_width="40" left_delta="0" mouse_opaque="true" max_val="256"
min_val="-256" name="Y pos" width="120" control_name="AscentBuildPrefs_PivotY"/>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.05"
label="Z pos" label_width="40" left_delta="0" mouse_opaque="true" max_val="256"
min_val="-256" name="Z pos" width="120" control_name="AscentBuildPrefs_PivotZ"/>
<check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Values are percent" left_delta="-5" mouse_opaque="true" tool_tip="Default settings are Percentages and every axis set at 50"
name="EmPivotPercToggle" radio_style="false" width="100" control_name="AscentBuildPrefs_PivotIsPercent"/>
<check_box bottom_delta="60" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Enable highlighting of selected prims" left_delta="140"
mouse_opaque="true" name="EmBuildPrefsRenderHighlight_toggle" control_name="AscentRenderHighlightSelections"
radio_style="false" width="270"/>
<check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Show axis arrow on root prim position" left_delta="0"
mouse_opaque="true" tool_tip="Default behaviour is to show the axis on the center of mass of a linkset. If enabled, the axis will be shown on the root prim of the linkset instead."
name="EmBuildPrefsActualRoot_toggle" control_name="AscentBuildPrefs_ActualRoot"
radio_style="false" width="270"/>
</panel>
</tab_container>
</panel>

View File

@@ -155,6 +155,24 @@
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast min vel:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="15" left="10"
mouse_opaque="true" name="av_mod_textbox" v_pad="0" width="394">
Avatar Offset Modifiers
</text>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.05"
label="X Modifier" label_width="65" left_delta="5" max_val="0.15" min_val="-0.15"
mouse_opaque="true" 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="left|top" height="16" increment="0.05"
label="Y Modifier" label_width="65" left_delta="0" max_val="0.20" min_val="-0.20"
mouse_opaque="true" 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."/>
<spinner bottom_delta="-20" decimal_digits="5" follows="left|top" height="16" increment="0.1"
label="Z Modifier" label_width="65" left_delta="0" max_val="5.0" min_val="-5.0"
mouse_opaque="true" name="Z Modifier" width="128" control_name="AscentAvatarZModifier"
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."/>
</panel>
</tab_container>
</panel>